[Lldb-commits] [lldb] r119165 - in /lldb/trunk/test: global_variables/TestGlobalVariables.py namespace/TestNamespace.py

Johnny Chen johnny.chen at apple.com
Mon Nov 15 10:27:57 PST 2010


Author: johnny
Date: Mon Nov 15 12:27:57 2010
New Revision: 119165

URL: http://llvm.org/viewvc/llvm-project?rev=119165&view=rev
Log:
Add test sequences for 'frame variable' address-of operator and 'frame variable' fully-qualified name variable.
Also add some comments.

Modified:
    lldb/trunk/test/global_variables/TestGlobalVariables.py
    lldb/trunk/test/namespace/TestNamespace.py

Modified: lldb/trunk/test/global_variables/TestGlobalVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/global_variables/TestGlobalVariables.py?rev=119165&r1=119164&r2=119165&view=diff
==============================================================================
--- lldb/trunk/test/global_variables/TestGlobalVariables.py (original)
+++ lldb/trunk/test/global_variables/TestGlobalVariables.py Mon Nov 15 12:27:57 2010
@@ -56,6 +56,9 @@
                        'GLOBAL: (const char *) g_file_static_cstr',
                        '"g_file_static_cstr"'])
 
+        # 'frame variable' should support address-of operator.
+        self.runCmd("frame variable &g_file_global_int")
+
 
 if __name__ == '__main__':
     import atexit

Modified: lldb/trunk/test/namespace/TestNamespace.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/namespace/TestNamespace.py?rev=119165&r1=119164&r2=119165&view=diff
==============================================================================
--- lldb/trunk/test/namespace/TestNamespace.py (original)
+++ lldb/trunk/test/namespace/TestNamespace.py Mon Nov 15 12:27:57 2010
@@ -54,14 +54,23 @@
             substrs = ['state is stopped',
                        'stop reason = breakpoint'])
 
+        # 'frame variable' with basename 'i' should work.
         self.expect("frame variable -c -G i",
             startstr = "main.cpp:%d: (int) (anonymous namespace)::i = 3" % self.line_var_i)
         # main.cpp:12: (int) (anonymous namespace)::i = 3
 
+        # 'frame variable' with basename 'j' should work, too.
         self.expect("frame variable -c -G j",
             startstr = "main.cpp:%d: (int) A::B::j = 4" % self.line_var_j)
         # main.cpp:19: (int) A::B::j = 4
 
+        # 'frame variable' should support address-of operator.
+        self.runCmd("frame variable &i")
+
+        # 'frame variable' with fully qualified name 'A::B::j' should work.
+        self.expect("frame variable 'A::B::j", VARIABLES_DISPLAYED_CORRECTLY,
+            startstr = '(int) A::B::j = 4')
+
         # rdar://problem/8660275
         # test/namespace: 'expression -- i+j' not working
         self.expect("expression -- i + j",





More information about the lldb-commits mailing list