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: not %dexter_regression_test -- %s | FileCheck %s
8 // CHECK: expect_program_state.cpp:
9 
GCD(int lhs,int rhs)10 int GCD(int lhs, int rhs)
11 {
12     if (rhs == 0)   // DexLabel('check')
13         return lhs;
14     return GCD(rhs, lhs % rhs);
15 }
16 
main()17 int main()
18 {
19     return GCD(111, 259);
20 }
21 
22 /*
23 DexExpectProgramState({
24     'frames': [
25         {
26             'location': {
27                 'lineno': ref('check')
28             },
29             'watches': {
30                 'lhs': '0', 'rhs': '0'
31             }
32         },
33     ]
34 })
35 */
36