1// Purpose:
2// Test that a \DexDeclareAddress value can be used to check the change in
3// value of a variable over time, relative to its initial value.
4//
5// RUN: %dexter_regression_test_build %s -o %t
6// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
7// CHECK: self_comparison.cpp
8
9int main() {
10 int *x = new int[3];
11 for (int *y = x; y < x + 3; ++y)
12 *y = 0; // DexLabel('test_line')
13 delete x;
14}
15
16// DexDeclareAddress('y', 'y', on_line=ref('test_line'))
17// DexExpectWatchValue('y', address('y'), address('y', 4), address('y', 8), on_line=ref('test_line'))
18

source code of cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/self_comparison.cpp