| 1 |
// Purpose: |
| 2 |
// Check that \DexExpectProgramState correctly applies a penalty when |
| 3 |
// an expected program state is never found. |
| 4 |
// |
| 5 |
// UNSUPPORTED: system-darwin |
| 6 |
// |
| 7 |
// RUN: %dexter_regression_test_cxx_build %s -o %t |
| 8 |
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s |
| 9 |
// CHECK: expect_program_state.cpp: |
| 10 |
|
| 11 |
int GCD(int lhs, int rhs) |
| 12 |
{ |
| 13 |
if (rhs == 0) // DexLabel('check') |
| 14 |
return lhs; |
| 15 |
return GCD(rhs, lhs % rhs); |
| 16 |
} |
| 17 |
|
| 18 |
int main() |
| 19 |
{ |
| 20 |
return GCD(111, 259); |
| 21 |
} |
| 22 |
|
| 23 |
/* |
| 24 |
DexExpectProgramState({ |
| 25 |
'frames': [ |
| 26 |
{ |
| 27 |
'location': { |
| 28 |
'lineno': ref('check') |
| 29 |
}, |
| 30 |
'watches': { |
| 31 |
'lhs': '0', 'rhs': '0' |
| 32 |
} |
| 33 |
}, |
| 34 |
] |
| 35 |
}) |
| 36 |
*/ |