1 // Purpose:
2 // Test that multiple \DexDeclareAddress references that point to different
3 // addresses can be used within a single \DexExpectWatchValue.
4 //
5 // RUN: %dexter_regression_test_build %s -o %t
6 // RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
7 // CHECK: multiple_address.cpp
8
main()9 int main() {
10 int *x = new int(5);
11 int *y = new int(4);
12 int *z = x;
13 *z = 0; // DexLabel('start_line')
14 z = y;
15 *z = 0;
16 delete x; // DexLabel('end_line')
17 delete y;
18 }
19
20 // DexDeclareAddress('x', 'x', on_line=ref('start_line'))
21 // DexDeclareAddress('y', 'y', on_line=ref('start_line'))
22 // DexExpectWatchValue('z', address('x'), address('y'), from_line=ref('start_line'), to_line=ref('end_line'))
23 // DexExpectWatchValue('*z', 5, 0, 4, 0, from_line=ref('start_line'), to_line=ref('end_line'))
24