Debian Codegraph @

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/missing_dex_address.cpp

raw
1 // Purpose:
2 // Test that when a \DexDeclareAddress never resolves to a value, it is
3 // counted as a missing value in any \DexExpectWatchValues.
4 //
5 // The dbgeng driver doesn't support \DexDeclareAddress yet.
6 // UNSUPPORTED: system-windows
7 //
8 // RUN: %dexter_regression_test_cxx_build %s -o %t
9 // RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
10 // CHECK: missing_dex_address.cpp
11
12 int main() {
13 int *x = nullptr;
14 x = new int(5); // DexLabel('start_line')
15 if (false) {
16 (void)0; // DexLabel('unreachable')
17 }
18 delete x; // DexLabel('end_line')
19 }
20
21 // DexDeclareAddress('x', 'x', on_line=ref('unreachable'))
22 // DexExpectWatchValue('x', 0, address('x'), from_line=ref('start_line'), to_line=ref('end_line'))