summaryrefslogtreecommitdiffstats
path: root/lldb/test/bitfields/TestBitfields.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-11-10 23:14:41 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-11-10 23:14:41 +0000
commit378ed7f3e71921f52f34ebef4492007a707458d1 (patch)
tree7acd01b3b05e3c30016600d3eb0b2801222cbe81 /lldb/test/bitfields/TestBitfields.py
parente39a9fcc0e35d965c4d4fdc04e701ef1cd19350b (diff)
downloadbcm5719-llvm-378ed7f3e71921f52f34ebef4492007a707458d1.tar.gz
bcm5719-llvm-378ed7f3e71921f52f34ebef4492007a707458d1.zip
Slight changes to how to phrase the assert for Python API thread.GetStopReason().
llvm-svn: 118731
Diffstat (limited to 'lldb/test/bitfields/TestBitfields.py')
-rw-r--r--lldb/test/bitfields/TestBitfields.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/test/bitfields/TestBitfields.py b/lldb/test/bitfields/TestBitfields.py
index 9c6aa225d7d..4ae75e76fe6 100644
--- a/lldb/test/bitfields/TestBitfields.py
+++ b/lldb/test/bitfields/TestBitfields.py
@@ -100,10 +100,11 @@ class BitfieldsTestCase(TestBase):
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
# The stop reason of the thread should be breakpoint.
- from lldbutil import StopReasonString
thread = target.GetProcess().GetThreadAtIndex(0)
- self.assertTrue(thread.GetStopReason() == lldb.eStopReasonBreakpoint,
- STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS % StopReasonString(thread.GetStopReason()))
+ if thread.GetStopReason() != lldb.eStopReasonBreakpoint:
+ from lldbutil import StopReasonString
+ self.fail(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)
OpenPOWER on IntegriCloud