summaryrefslogtreecommitdiffstats
path: root/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func_external.cpp
blob: 6dff5c80296873d0e4797c73e84953504bffd888 (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 counts 'FUNC_EXTERNAL' steps
//      for a trivial test. Expect one 'FUNC_EXTERNAL' per external call.
//
// REQUIRES: system-linux, lldb
// XFAIL: system-linux
// This fails right now on my linux machine, needs examining as to why.
//
// RUN: %dexter --fail-lt 1.0 -w  \
// RUN:     --builder 'clang' --debugger 'lldb' --cflags "-O0 -g" -- %s \
// RUN:     | FileCheck %s
// CHECK: func_external.cpp:

#include <cstdlib>

int func(int i){
    return abs(i);
}

int main()
{
    func(0);
    func(1);
    return 0;
}

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