summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-07-13 00:31:31 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-07-13 00:31:31 +0000
commit0d0dff43983bc9be0ccdeb1eedaa4e63eafa4c30 (patch)
tree386347d74efb079510f024ace55df927b54db946
parent0402e8fe4b455e84d5c0573a1ee3ab1fb161f54c (diff)
downloadbcm5719-llvm-0d0dff43983bc9be0ccdeb1eedaa4e63eafa4c30.tar.gz
bcm5719-llvm-0d0dff43983bc9be0ccdeb1eedaa4e63eafa4c30.zip
Add display of a static int variable to the test scenario.
llvm-svn: 135016
-rw-r--r--lldb/test/functionalities/target_command/TestTargetCommand.py4
-rw-r--r--lldb/test/functionalities/target_command/globals.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/lldb/test/functionalities/target_command/TestTargetCommand.py b/lldb/test/functionalities/target_command/TestTargetCommand.py
index 7b2648c6df1..afcf5ee5681 100644
--- a/lldb/test/functionalities/target_command/TestTargetCommand.py
+++ b/lldb/test/functionalities/target_command/TestTargetCommand.py
@@ -107,6 +107,8 @@ class targetCommandTestCase(TestBase):
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 @@ class targetCommandTestCase(TestBase):
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__':
diff --git a/lldb/test/functionalities/target_command/globals.c b/lldb/test/functionalities/target_command/globals.c
index 000104890ef..51f08856518 100644
--- a/lldb/test/functionalities/target_command/globals.c
+++ b/lldb/test/functionalities/target_command/globals.c
@@ -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;
}
OpenPOWER on IntegriCloud