[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
This commit is contained in:
Dave Lee
2021-02-01 12:01:32 -08:00
parent ff1147c363
commit 619e2e095f
55 changed files with 206 additions and 205 deletions

View File

@@ -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()