1 | // Purpose: |
2 | // Test that a \DexDeclareAddress value can be used to compare two equal |
3 | // pointer variables. |
4 | // |
5 | // RUN: %dexter_regression_test_build %s -o %t |
6 | // RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s |
7 | // CHECK: identical_address.cpp |
8 | |
9 | int main() { |
10 | int *x = new int(5); |
11 | int *y = x; |
12 | delete x; // DexLabel('test_line') |
13 | } |
14 | |
15 | // DexDeclareAddress('x', 'x', on_line=ref('test_line')) |
16 | // DexExpectWatchValue('x', address('x'), on_line=ref('test_line')) |
17 | // DexExpectWatchValue('y', address('x'), on_line=ref('test_line')) |
18 | |