Use assertEqual to improve test failure logging
Some tests in test/functionalities/tail_call_frames are failing on non-Darwin platforms. Use assertEqual to improve logging on failure. llvm-svn: 344581
This commit is contained in:
parent
a9bc0face5
commit
b48515a44e
|
@ -43,11 +43,11 @@ class TestTailCallFrameSBAPI(TestBase):
|
|||
# Did we hit our breakpoint?
|
||||
threads = lldbutil.get_threads_stopped_at_breakpoint(process,
|
||||
breakpoint)
|
||||
self.assertTrue(
|
||||
len(threads) == 1,
|
||||
self.assertEqual(
|
||||
len(threads), 1,
|
||||
"There should be a thread stopped at our breakpoint")
|
||||
|
||||
self.assertTrue(breakpoint.GetHitCount() == 1)
|
||||
self.assertEqual(breakpoint.GetHitCount(), 1)
|
||||
|
||||
thread = threads[0]
|
||||
|
||||
|
@ -61,5 +61,5 @@ class TestTailCallFrameSBAPI(TestBase):
|
|||
artificiality = [False, True, False, True, False]
|
||||
for idx, (name, is_artificial) in enumerate(zip(names, artificiality)):
|
||||
frame = thread.GetFrameAtIndex(idx)
|
||||
self.assertTrue(frame.GetDisplayFunctionName() == name)
|
||||
self.assertTrue(frame.IsArtificial() == is_artificial)
|
||||
self.assertEqual(frame.GetDisplayFunctionName(), name)
|
||||
self.assertEqual(frame.IsArtificial(), is_artificial)
|
||||
|
|
|
@ -35,11 +35,11 @@ class TestArtificialFrameThreadStepOut1(TestBase):
|
|||
# Did we hit our breakpoint?
|
||||
threads = lldbutil.get_threads_stopped_at_breakpoint(process,
|
||||
breakpoint)
|
||||
self.assertTrue(
|
||||
len(threads) == 1,
|
||||
self.assertEqual(
|
||||
len(threads), 1,
|
||||
"There should be a thread stopped at our breakpoint")
|
||||
|
||||
self.assertTrue(breakpoint.GetHitCount() == 1)
|
||||
self.assertEqual(breakpoint.GetHitCount(), 1)
|
||||
|
||||
thread = threads[0]
|
||||
|
||||
|
@ -59,13 +59,13 @@ class TestArtificialFrameThreadStepOut1(TestBase):
|
|||
# frame #2, because we behave as-if artificial frames were not present.
|
||||
thread.StepOut()
|
||||
frame2 = thread.GetSelectedFrame()
|
||||
self.assertTrue(frame2.GetDisplayFunctionName() == "func2()")
|
||||
self.assertEqual(frame2.GetDisplayFunctionName(), "func2()")
|
||||
self.assertFalse(frame2.IsArtificial())
|
||||
|
||||
# Ditto: stepping out of frame #2 should move to frame #4.
|
||||
thread.StepOut()
|
||||
frame4 = thread.GetSelectedFrame()
|
||||
self.assertTrue(frame4.GetDisplayFunctionName() == "main")
|
||||
self.assertEqual(frame4.GetDisplayFunctionName(), "main")
|
||||
self.assertFalse(frame2.IsArtificial())
|
||||
|
||||
def test_return_past_artificial_frame(self):
|
||||
|
@ -78,13 +78,13 @@ class TestArtificialFrameThreadStepOut1(TestBase):
|
|||
# to frame #2.
|
||||
thread.ReturnFromFrame(thread.GetSelectedFrame(), value)
|
||||
frame2 = thread.GetSelectedFrame()
|
||||
self.assertTrue(frame2.GetDisplayFunctionName() == "func2()")
|
||||
self.assertEqual(frame2.GetDisplayFunctionName(), "func2()")
|
||||
self.assertFalse(frame2.IsArtificial())
|
||||
|
||||
# Ditto: stepping out of frame #2 should move to frame #4.
|
||||
thread.ReturnFromFrame(thread.GetSelectedFrame(), value)
|
||||
frame4 = thread.GetSelectedFrame()
|
||||
self.assertTrue(frame4.GetDisplayFunctionName() == "main")
|
||||
self.assertEqual(frame4.GetDisplayFunctionName(), "main")
|
||||
self.assertFalse(frame2.IsArtificial())
|
||||
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue