[Lldb-commits] [lldb] r135716 - /lldb/trunk/test/python_api/value/TestValueAPI.py

Johnny Chen johnny.chen at apple.com
Thu Jul 21 16:02:00 PDT 2011


Author: johnny
Date: Thu Jul 21 18:02:00 2011
New Revision: 135716

URL: http://llvm.org/viewvc/llvm-project?rev=135716&view=rev
Log:
Add test scenario of SBValue APIs for the 'days_of_week' global variable.

Modified:
    lldb/trunk/test/python_api/value/TestValueAPI.py

Modified: lldb/trunk/test/python_api/value/TestValueAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/value/TestValueAPI.py?rev=135716&r1=135715&r2=135716&view=diff
==============================================================================
--- lldb/trunk/test/python_api/value/TestValueAPI.py (original)
+++ lldb/trunk/test/python_api/value/TestValueAPI.py Thu Jul 21 18:02:00 2011
@@ -59,6 +59,13 @@
         self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint condition")
         frame0 = thread.GetFrameAtIndex(0)
 
+        # Get global variable 'days_of_week'.
+        list = target.FindGlobalVariables('days_of_week', 1)
+        days_of_week = list.GetValueAtIndex(0)
+        self.assertTrue(days_of_week, VALID_VARIABLE)
+        self.assertTrue(days_of_week.GetNumChildren() == 7, VALID_VARIABLE)
+        self.DebugSBValue(days_of_week)
+
         # Get variable 'str_ptr'.
         value = frame0.FindVariable('str_ptr')
         self.assertTrue(value, VALID_VARIABLE)





More information about the lldb-commits mailing list