[Lldb-commits] [lldb] r135016 - in /lldb/trunk/test/functionalities/target_command: TestTargetCommand.py globals.c

Johnny Chen johnny.chen at apple.com
Tue Jul 12 17:31:31 PDT 2011


Author: johnny
Date: Tue Jul 12 19:31:31 2011
New Revision: 135016

URL: http://llvm.org/viewvc/llvm-project?rev=135016&view=rev
Log:
Add display of a static int variable to the test scenario.

Modified:
    lldb/trunk/test/functionalities/target_command/TestTargetCommand.py
    lldb/trunk/test/functionalities/target_command/globals.c

Modified: lldb/trunk/test/functionalities/target_command/TestTargetCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/target_command/TestTargetCommand.py?rev=135016&r1=135015&r2=135016&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/target_command/TestTargetCommand.py (original)
+++ lldb/trunk/test/functionalities/target_command/TestTargetCommand.py Tue Jul 12 19:31:31 2011
@@ -107,6 +107,8 @@
             substrs = ["my_global_char", "'X'"])
         self.expect("target variable my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ['my_global_str', '"abc"'])
+        self.expect("target variable my_static_int", VARIABLES_DISPLAYED_CORRECTLY,
+            substrs = ['my_static_int', '228'])
 
         self.runCmd("run")
 
@@ -116,6 +118,8 @@
             substrs = ["my_global_char", "'X'"])
         self.expect("target variable my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ['my_global_str', '"abc"'])
+        self.expect("target variable my_static_int", VARIABLES_DISPLAYED_CORRECTLY,
+            substrs = ['my_static_int', '228'])
 
 
 if __name__ == '__main__':

Modified: lldb/trunk/test/functionalities/target_command/globals.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/target_command/globals.c?rev=135016&r1=135015&r2=135016&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/target_command/globals.c (original)
+++ lldb/trunk/test/functionalities/target_command/globals.c Tue Jul 12 19:31:31 2011
@@ -10,12 +10,15 @@
 
 char my_global_char = 'X';
 const char* my_global_str = "abc";
+static int my_static_int = 228;
 
 int main (int argc, char const *argv[])
 {
     printf("global char: %c\n", my_global_char);
     
     printf("global str: %s\n", my_global_str);
+
+    printf("argc + my_static_int = %d\n", (argc + my_static_int));
     
     return 0;
 }





More information about the lldb-commits mailing list