Add the actual stop reason to an assert message for bitfields_variable_python()

test method when asserting:

    thread.GetStopReason() == lldb.eStopReasonBreakpoint

llvm-svn: 118711
This commit is contained in:
Johnny Chen 2010-11-10 20:20:06 +00:00
parent 2c88643a22
commit de0338bac9
2 changed files with 6 additions and 2 deletions

View File

@ -84,6 +84,8 @@ class BitfieldsTestCase(TestBase):
def bitfields_variable_python(self):
"""Use Python APIs to inspect a bitfields variable."""
from lldbutil import StopReasonString
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@ -102,7 +104,7 @@ class BitfieldsTestCase(TestBase):
# The stop reason of the thread should be breakpoint.
thread = target.GetProcess().GetThreadAtIndex(0)
self.assertTrue(thread.GetStopReason() == lldb.eStopReasonBreakpoint,
STOPPED_DUE_TO_BREAKPOINT)
STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS % StopReasonString(thread.GetStopReason()))
# The breakpoint should have a hit count of 1.
self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)

View File

@ -151,7 +151,9 @@ BREAKPOINT_HIT_THRICE = "Breakpoint resolved with hit cout = 3"
STEP_OUT_SUCCEEDED = "Thread step-out succeeded"
STOPPED_DUE_TO_BREAKPOINT = "Process state is stopped due to breakpoint"
STOPPED_DUE_TO_BREAKPOINT = "Process is stopped due to breakpoint"
STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS = "Process is stopped due to breakpoint (actual stop reason: '%s')"
STOPPED_DUE_TO_BREAKPOINT_CONDITION = "Stopped due to breakpoint condition"