summaryrefslogtreecommitdiffstats
path: root/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/small_loop.cpp
blob: 1f9060747ec2c2141f6ecc6cdd268b6ca6b4e21f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Purpose:
//      Check that \DexExpectStepKind correctly counts function calls in loops
//      where the last source line in the loop is a call. Expect steps out
//      of a function to a line before the call to count as 'VERTICAL_BACKWARD'.
//
// REQUIRES: system-linux, lldb
//
// RUN: %dexter_base test --fail-lt 1.0 -w  \
// RUN:     --builder 'clang' --debugger 'lldb' --cflags "-O0 -g" -- %s \
// RUN:     | FileCheck %s
// CHECK: small_loop.cpp:

int func(int i){
    return i;
}

int main()
{
    for (int i = 0; i < 2; ++i) {
        func(i);
    }
    return 0;
}

// DexExpectStepKind('VERTICAL_BACKWARD', 2)
OpenPOWER on IntegriCloud