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_build %s -o %t
9// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
10// CHECK: recursive.cpp:
11
12int func(int i) {
13 if (i > 1)
14 return i + func(i: i - 1);
15 return i;
16}
17
18int main()
19{
20 return func(i: 3);
21}
22
23// main, func, func, func
24// DexExpectStepKind('FUNC', 4)
25// DexExpectStepKind('VERTICAL_BACKWARD', 0)
26

source code of cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/recursive.cpp