summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-11-10 20:30:37 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-11-10 20:30:37 +0000
commite9ad7fecf02868cd03ac51aef35374b0ce3fec1c (patch)
tree3884e294f0b98eb8dceaf9ab710f446411dd95df
parent4640a18cf45c532a371ac343286bd0760242455d (diff)
downloadbcm5719-llvm-e9ad7fecf02868cd03ac51aef35374b0ce3fec1c.tar.gz
bcm5719-llvm-e9ad7fecf02868cd03ac51aef35374b0ce3fec1c.zip
Finish adding the actual stop reason as part of the assert message when asserting:
thread.GetStopReason() == lldb.eStopReasonBreakpoint llvm-svn: 118713
-rw-r--r--lldb/test/array_types/TestArrayTypes.py3
-rw-r--r--lldb/test/bitfields/TestBitfields.py3
-rw-r--r--lldb/test/class_types/TestClassTypes.py4
-rw-r--r--lldb/test/hello_world/TestHelloWorld.py3
4 files changed, 7 insertions, 6 deletions
diff --git a/lldb/test/array_types/TestArrayTypes.py b/lldb/test/array_types/TestArrayTypes.py
index b3e1b0bcfc4..446a5c3b2cf 100644
--- a/lldb/test/array_types/TestArrayTypes.py
+++ b/lldb/test/array_types/TestArrayTypes.py
@@ -120,9 +120,10 @@ class ArrayTypesTestCase(TestBase):
"executable = a.out"])
# The stop reason of the thread should be breakpoint.
+ from lldbutil import StopReasonString
thread = self.process.GetThreadAtIndex(0)
self.assertTrue(thread.GetStopReason() == lldb.eStopReasonBreakpoint,
- STOPPED_DUE_TO_BREAKPOINT)
+ STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS % StopReasonString(thread.GetStopReason()))
# Sanity check the print representation of thread.
thr = repr(thread)
diff --git a/lldb/test/bitfields/TestBitfields.py b/lldb/test/bitfields/TestBitfields.py
index 8adfeb181a2..9c6aa225d7d 100644
--- a/lldb/test/bitfields/TestBitfields.py
+++ b/lldb/test/bitfields/TestBitfields.py
@@ -84,8 +84,6 @@ 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,6 +100,7 @@ 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()))
diff --git a/lldb/test/class_types/TestClassTypes.py b/lldb/test/class_types/TestClassTypes.py
index 55fb63bb043..1dfa30e53fd 100644
--- a/lldb/test/class_types/TestClassTypes.py
+++ b/lldb/test/class_types/TestClassTypes.py
@@ -130,10 +130,10 @@ class ClassTypesTestCase(TestBase):
lldbutil.StateTypeString(self.process.GetState()))
# The stop reason of the thread should be breakpoint.
+ from lldbutil import StopReasonString
thread = self.process.GetThreadAtIndex(0)
-
self.assertTrue(thread.GetStopReason() == lldb.eStopReasonBreakpoint,
- STOPPED_DUE_TO_BREAKPOINT)
+ STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS % StopReasonString(thread.GetStopReason()))
# The filename of frame #0 should be 'main.cpp' and the line number
# should be 93.
diff --git a/lldb/test/hello_world/TestHelloWorld.py b/lldb/test/hello_world/TestHelloWorld.py
index bc6dddf8b69..21d62f54347 100644
--- a/lldb/test/hello_world/TestHelloWorld.py
+++ b/lldb/test/hello_world/TestHelloWorld.py
@@ -68,9 +68,10 @@ class HelloWorldTestCase(TestBase):
self.process = target.GetProcess()
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
+ from lldbutil import StopReasonString
thread = self.process.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)
OpenPOWER on IntegriCloud