blob: 4d35633bf8525ea5470251ceb900ba81622c7ece [file] [log] [blame]
Jeremy Morse984fad22019-10-31 16:51:53 +00001// REQUIRES: system-windows
2//
3// RUN: %dexter --fail-lt 1.0 -w --builder 'clang-cl_vs2015' \
4// RUN: --debugger 'dbgeng' --cflags '/Z7 /Zi' --ldflags '/Z7 /Zi' -- %s
5
6// Check that global constants have debug info.
7
8const float TestPi = 3.14;
9struct S {
10 static const char TestCharA = 'a';
11};
12enum TestEnum : int {
13 ENUM_POS = 2147000000,
14 ENUM_NEG = -2147000000,
15};
16void useConst(int) {}
17int main() {
18 useConst(TestPi);
19 useConst(S::TestCharA);
20 useConst(ENUM_NEG); // DexLabel('stop')
21 return 0;
22}
23
OCHyams98e79112021-05-21 08:56:14 +010024// DexExpectWatchValue('TestPi', 3.140000104904175, on_line=ref('stop'))
25// DexExpectWatchValue('S::TestCharA', 97, on_line=ref('stop'))
26// DexExpectWatchValue('ENUM_NEG', -2147000000, on_line=ref('stop'))
Jeremy Morse984fad22019-10-31 16:51:53 +000027/* DexExpectProgramState({'frames': [{
OCHyams98e79112021-05-21 08:56:14 +010028 'location': {'lineno' : ref('stop')},
Jeremy Morse984fad22019-10-31 16:51:53 +000029 'watches': {'ENUM_POS' : {'is_irretrievable': True}}
30}]}) */