| 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_cxx_build %s -o %t |
| 6 | // RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s |
| 7 | // CHECK: self_comparison.cpp |
| 8 | |
| 9 | int 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 | |