mirror of
https://github.com/intel/llvm.git
synced 2026-01-30 22:53:05 +08:00
[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 ce825e4674.
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
This commit is contained in:
@@ -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
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user