summaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api/value/TestValueAPI.py
diff options
context:
space:
mode:
authorDave Lee <davelee.com@gmail.com>2022-11-11 16:19:03 -0800
committerDave Lee <davelee.com@gmail.com>2022-11-11 17:03:02 -0800
commit1fb5c7a2f17f10e768160fe23d4a04537c7224c1 (patch)
treec8092fe49b665df0014cc8b27835f7362151c578 /lldb/test/API/python_api/value/TestValueAPI.py
parenta58541f14d2d3e7d65f2e9b341bf2321b312c615 (diff)
[lldb] Rewrite to assertEqual/assertNotEqual (NFC)
Using the more specific assert* methods results in more useful error message.
Diffstat (limited to 'lldb/test/API/python_api/value/TestValueAPI.py')
-rw-r--r--lldb/test/API/python_api/value/TestValueAPI.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/lldb/test/API/python_api/value/TestValueAPI.py b/lldb/test/API/python_api/value/TestValueAPI.py
index 98546e8f08f9..85d8b494e3d3 100644
--- a/lldb/test/API/python_api/value/TestValueAPI.py
+++ b/lldb/test/API/python_api/value/TestValueAPI.py
@@ -158,10 +158,10 @@ class ValueAPITestCase(TestBase):
self.assertFalse(lldb.value(frame0.FindVariable('bogus')))
self.assertTrue(lldb.value(frame0.FindVariable('uinthex')))
- self.assertTrue(int(lldb.value(frame0.FindVariable('uinthex')))
- == 3768803088, 'uinthex == 3768803088')
- self.assertTrue(int(lldb.value(frame0.FindVariable('sinthex')))
- == -526164208, 'sinthex == -526164208')
+ self.assertEqual(int(lldb.value(frame0.FindVariable('uinthex'))),
+ 3768803088, 'uinthex == 3768803088')
+ self.assertEqual(int(lldb.value(frame0.FindVariable('sinthex'))),
+ -526164208, 'sinthex == -526164208')
# Check value_iter works correctly.
for v in [
@@ -177,11 +177,9 @@ class ValueAPITestCase(TestBase):
frame0.FindVariable('sinthex').GetValueAsUnsigned(), 3768803088,
'unsigned sinthex == 3768803088')
- self.assertTrue(
- frame0.FindVariable('uinthex').GetValueAsSigned() == -
- 526164208,
+ self.assertEqual(
+ frame0.FindVariable('uinthex').GetValueAsSigned(), -526164208,
'signed uinthex == -526164208')
- self.assertTrue(
- frame0.FindVariable('sinthex').GetValueAsSigned() == -
- 526164208,
+ self.assertEqual(
+ frame0.FindVariable('sinthex').GetValueAsSigned(), -526164208,
'signed sinthex == -526164208')