[Lldb-commits] [lldb] r118713 - in /lldb/trunk/test: array_types/TestArrayTypes.py bitfields/TestBitfields.py class_types/TestClassTypes.py hello_world/TestHelloWorld.py

Johnny Chen johnny.chen at apple.com
Wed Nov 10 12:30:37 PST 2010


Author: johnny
Date: Wed Nov 10 14:30:37 2010
New Revision: 118713

URL: http://llvm.org/viewvc/llvm-project?rev=118713&view=rev
Log:
Finish adding the actual stop reason as part of the assert message when asserting:

    thread.GetStopReason() == lldb.eStopReasonBreakpoint

Modified:
    lldb/trunk/test/array_types/TestArrayTypes.py
    lldb/trunk/test/bitfields/TestBitfields.py
    lldb/trunk/test/class_types/TestClassTypes.py
    lldb/trunk/test/hello_world/TestHelloWorld.py

Modified: lldb/trunk/test/array_types/TestArrayTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/array_types/TestArrayTypes.py?rev=118713&r1=118712&r2=118713&view=diff
==============================================================================
--- lldb/trunk/test/array_types/TestArrayTypes.py (original)
+++ lldb/trunk/test/array_types/TestArrayTypes.py Wed Nov 10 14:30:37 2010
@@ -120,9 +120,10 @@
                        "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)

Modified: lldb/trunk/test/bitfields/TestBitfields.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/bitfields/TestBitfields.py?rev=118713&r1=118712&r2=118713&view=diff
==============================================================================
--- lldb/trunk/test/bitfields/TestBitfields.py (original)
+++ lldb/trunk/test/bitfields/TestBitfields.py Wed Nov 10 14:30:37 2010
@@ -84,8 +84,6 @@
 
     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 @@
         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()))

Modified: lldb/trunk/test/class_types/TestClassTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/class_types/TestClassTypes.py?rev=118713&r1=118712&r2=118713&view=diff
==============================================================================
--- lldb/trunk/test/class_types/TestClassTypes.py (original)
+++ lldb/trunk/test/class_types/TestClassTypes.py Wed Nov 10 14:30:37 2010
@@ -130,10 +130,10 @@
                       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.

Modified: lldb/trunk/test/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/hello_world/TestHelloWorld.py?rev=118713&r1=118712&r2=118713&view=diff
==============================================================================
--- lldb/trunk/test/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/test/hello_world/TestHelloWorld.py Wed Nov 10 14:30:37 2010
@@ -68,9 +68,10 @@
         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)





More information about the lldb-commits mailing list