summaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
diff options
context:
space:
mode:
authorDave Lee <davelee.com@gmail.com>2021-02-01 12:01:32 -0800
committerDave Lee <davelee.com@gmail.com>2021-02-02 12:39:03 -0800
commit619e2e095fb1cd1e60b745cf1a10af9f67a4cd41 (patch)
tree438cb3e839024613694d1fd5f6cd1e2a50654dc7 /lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
parentff1147c3635685ba6aefbdc9394300adb5404595 (diff)
[lldb] Convert assertTrue(a == b) to assertEqual(a, b)
Convert `assertTrue(a == b)` to `assertEqual(a, b)` to produce better failure messages. These were mostly done via regex search & replace, with some manual fixes. Differential Revision: https://reviews.llvm.org/D95813
Diffstat (limited to 'lldb/test/API/python_api/function_symbol/TestSymbolAPI.py')
-rw-r--r--lldb/test/API/python_api/function_symbol/TestSymbolAPI.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/test/API/python_api/function_symbol/TestSymbolAPI.py b/lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
index c5bcb152beb0..09e7db7fcefc 100644
--- a/lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
+++ b/lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
@@ -53,7 +53,7 @@ class SymbolAPITestCase(TestBase):
self.assertTrue(process, PROCESS_IS_VALID)
# Frame #0 should be on self.line1.
- self.assertTrue(process.GetState() == lldb.eStateStopped)
+ self.assertEqual(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
@@ -62,7 +62,7 @@ class SymbolAPITestCase(TestBase):
frame0 = thread.GetFrameAtIndex(0)
symbol_line1 = frame0.GetSymbol()
# We should have a symbol type of code.
- self.assertTrue(symbol_line1.GetType() == lldb.eSymbolTypeCode)
+ self.assertEqual(symbol_line1.GetType(), lldb.eSymbolTypeCode)
addr_line1 = symbol_line1.GetStartAddress()
# And a section type of code, too.
self.assertTrue(addr_line1.GetSection().GetSectionType()
@@ -70,7 +70,7 @@ class SymbolAPITestCase(TestBase):
# Continue the inferior, the breakpoint 2 should be hit.
process.Continue()
- self.assertTrue(process.GetState() == lldb.eStateStopped)
+ self.assertEqual(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
@@ -79,7 +79,7 @@ class SymbolAPITestCase(TestBase):
frame0 = thread.GetFrameAtIndex(0)
symbol_line2 = frame0.GetSymbol()
# We should have a symbol type of code.
- self.assertTrue(symbol_line2.GetType() == lldb.eSymbolTypeCode)
+ self.assertEqual(symbol_line2.GetType(), lldb.eSymbolTypeCode)
addr_line2 = symbol_line2.GetStartAddress()
# And a section type of code, too.
self.assertTrue(addr_line2.GetSection().GetSectionType()