From 0d0dff43983bc9be0ccdeb1eedaa4e63eafa4c30 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Wed, 13 Jul 2011 00:31:31 +0000 Subject: Add display of a static int variable to the test scenario. llvm-svn: 135016 --- lldb/test/functionalities/target_command/TestTargetCommand.py | 4 ++++ lldb/test/functionalities/target_command/globals.c | 3 +++ 2 files changed, 7 insertions(+) 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; } -- cgit v1.2.3