1 // Purpose:
2 //      Check that \DexExpectStepKind correctly handles recursive calls.
3 //      Specifically, ensure recursive calls count towards 'FUNC' and not
4 //      'VERTICAL_BACKWARD'.
5 //
6 // UNSUPPORTED: system-darwin
7 //
8 // RUN: %dexter_regression_test -- %s | FileCheck %s
9 // CHECK: recursive.cpp:
10 
func(int i)11 int func(int i) {
12     if (i > 1)
13         return i + func(i - 1);
14     return i;
15 }
16 
main()17 int main()
18 {
19     return func(3);
20 }
21 
22 // main, func, func, func
23 // DexExpectStepKind('FUNC', 4)
24 // DexExpectStepKind('VERTICAL_BACKWARD', 0)
25