summaryrefslogtreecommitdiffstats
path: root/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_kinds.cpp
blob: 54f363e6fd0b8f2c7c4ab6b67bf2fc14909692c7 (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
26
27
// Purpose:
//      Check that \DexExpectStepKind correctly applies a penalty when
//      unexpected step kinds are encountered.
//
// REQUIRES: system-linux, lldb
//
// RUN: not %dexter test --fail-lt 1.0 -w  \
// RUN:     --builder 'clang' --debugger 'lldb' --cflags "-O0 -g" -- %s \
// RUN:     | FileCheck %s
// CHECK: expect_step_kinds.cpp:

int abs(int i){
    return i < 0? i * -1: i;
}

int main()
{
    volatile int x = 2;
    for (int i = 0; i < x; ++i) {
        abs(i);
    }
    return 0;
}

// DexExpectStepKind('FUNC', 5)
// DexExpectStepKind('FUNC_EXTERNAL', 2)
// DexExpectStepKind('VERTICAL_BACKWARD', 2)
OpenPOWER on IntegriCloud