summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-10-16 03:31:33 +0000
committerVedant Kumar <vsk@apple.com>2018-10-16 03:31:33 +0000
commitb48515a44e2e92de4c026cca2881d420b29724ff (patch)
tree3326cad4312aa1343dccdb828ca9a42124009f94 /lldb/packages/Python/lldbsuite/test
parenta9bc0face598fa65b5c20844ec37e551725802d1 (diff)
downloadbcm5719-llvm-b48515a44e2e92de4c026cca2881d420b29724ff.tar.gz
bcm5719-llvm-b48515a44e2e92de4c026cca2881d420b29724ff.zip
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py10
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py14
2 files changed, 12 insertions, 12 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
index 0e475a4c006..be3d97282f5 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
@@ -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)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py
index c1806f62ef7..1c9d6c77083 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py
@@ -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):
OpenPOWER on IntegriCloud