diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2022-08-03 11:42:12 -0700 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2022-08-03 11:44:13 -0700 |
| commit | 0f821339dad1bf45dd71a1cac32b6352ba251ecb (patch) | |
| tree | a324aaed0dee45aad11f4d5972e18f98f70ebb2c /lldb/test/API/python_api | |
| parent | 371610793491fcd1c9af114a0de0cdda9a4408b0 (diff) | |
| download | llvm-0f821339dad1bf45dd71a1cac32b6352ba251ecb.zip llvm-0f821339dad1bf45dd71a1cac32b6352ba251ecb.tar.gz llvm-0f821339dad1bf45dd71a1cac32b6352ba251ecb.tar.bz2 | |
[lldb] Add assertStopReason helper function
Add a function to make it easier to debug a test failure caused by an
unexpected stop reason. This is similar to the assertState helper that
was added in ce825e46743b.
Before:
self.assertEqual(stop_reason, lldb.eStopReasonInstrumentation)
AssertionError: 5 != 10
After:
self.assertStopReason(stop_reason, lldb.eStopReasonInstrumentation)
AssertionError: signal (5) != instrumentation (10)
Differential revision: https://reviews.llvm.org/D131083
Diffstat (limited to 'lldb/test/API/python_api')
| -rw-r--r-- | lldb/test/API/python_api/thread/TestThreadAPI.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/test/API/python_api/thread/TestThreadAPI.py b/lldb/test/API/python_api/thread/TestThreadAPI.py index 612c47e..50dd73c4 100644 --- a/lldb/test/API/python_api/thread/TestThreadAPI.py +++ b/lldb/test/API/python_api/thread/TestThreadAPI.py @@ -214,7 +214,7 @@ class ThreadAPITestCase(TestBase): # main2.cpp. frame0 = thread.GetFrameAtIndex(0) lineEntry = frame0.GetLineEntry() - self.assertEqual(thread.GetStopReason(), lldb.eStopReasonPlanComplete) + self.assertStopReason(thread.GetStopReason(), lldb.eStopReasonPlanComplete) # Expected failure with clang as the compiler. # rdar://problem/9223880 # |
