xref: /llvm-project/cross-project-tests/debuginfo-tests/dexter-tests/namespace.cpp (revision e6cc7b723f244f52663b6d67a5d94597109da1ef)
1 // Purpose:
2 // Ensure that the debug information for a global variable includes
3 // namespace information.
4 
5 // REQUIRES: lldb
6 // UNSUPPORTED: system-windows
7 
8 // RUN: %clang -g -O0 %s -o %t
9 // RUN: %dexter --fail-lt 1.0 -w \
10 // RUN:     --binary %t --debugger 'lldb' -v -- %s
11 
12 #include <stdio.h>
13 
14 namespace monkey {
15 const int ape = 32;
16 }
17 
main()18 int main() {
19   printf("hello %d\n", monkey::ape); // DexLabel('main')
20   return 0;
21 }
22 
23 // DexExpectWatchValue('monkey::ape', 32, on_line=ref('main'))
24 
25