diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-07-08 23:33:36 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-07-08 23:33:36 +0000 |
commit | 98a5ddd00660092ba27b9d9217d8ffb51a25c91e (patch) | |
tree | 7e62baf77de63b8e7f95d2030ca8b1ec655f9494 | |
parent | 3346582bca29a077d24362f3dbea45f96d693904 (diff) | |
download | llvm-98a5ddd00660092ba27b9d9217d8ffb51a25c91e.zip llvm-98a5ddd00660092ba27b9d9217d8ffb51a25c91e.tar.gz llvm-98a5ddd00660092ba27b9d9217d8ffb51a25c91e.tar.bz2 |
Add test scenarios for 'target variable' command into TestGlobalVariables.py file.
llvm-svn: 134771
-rw-r--r-- | lldb/test/lang/c/global_variables/TestGlobalVariables.py | 8 | ||||
-rw-r--r-- | lldb/test/lang/c/global_variables/a.c | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lldb/test/lang/c/global_variables/TestGlobalVariables.py b/lldb/test/lang/c/global_variables/TestGlobalVariables.py index 8179e42..032f979 100644 --- a/lldb/test/lang/c/global_variables/TestGlobalVariables.py +++ b/lldb/test/lang/c/global_variables/TestGlobalVariables.py @@ -59,6 +59,14 @@ class GlobalVariablesTestCase(TestBase): # 'frame variable' should support address-of operator. self.runCmd("frame variable &g_file_global_int") + # Exercise the 'target variable' command to display globals in a.c file. + self.expect("target variable g_a", VARIABLES_DISPLAYED_CORRECTLY, + substrs = ['g_a', '123']) + self.expect("target variable g_marked_spot.x", VARIABLES_DISPLAYED_CORRECTLY, + substrs = ['g_marked_spot.x', '20']) + self.expect("target variable g_marked_spot.y", VARIABLES_DISPLAYED_CORRECTLY, + substrs = ['g_marked_spot.y', '21']) + if __name__ == '__main__': import atexit diff --git a/lldb/test/lang/c/global_variables/a.c b/lldb/test/lang/c/global_variables/a.c index 0a9b4f6..d169d5d 100644 --- a/lldb/test/lang/c/global_variables/a.c +++ b/lldb/test/lang/c/global_variables/a.c @@ -7,4 +7,9 @@ // //===----------------------------------------------------------------------===// int g_a = 123; +struct Point { + int x; + int y; +}; +struct Point g_marked_spot = { 20, 21 }; |