| 1 |
// Purpose: |
| 2 |
// Check that \DexExpectStepKind correctly counts function calls in loops |
| 3 |
// where the last source line in the loop is a call. Expect steps out |
| 4 |
// of a function to a line before the call to count as 'VERTICAL_BACKWARD'. |
| 5 |
// |
| 6 |
// UNSUPPORTED: system-darwin |
| 7 |
// |
| 8 |
// RUN: %dexter_regression_test_cxx_build %s -o %t |
| 9 |
// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s |
| 10 |
// CHECK: small_loop.cpp: |
| 11 |
|
| 12 |
int func(int i){ |
| 13 |
return i; |
| 14 |
} |
| 15 |
|
| 16 |
int main() |
| 17 |
{ |
| 18 |
for (int i = 0; i < 2; ++i) { |
| 19 |
func(i); |
| 20 |
} |
| 21 |
return 0; |
| 22 |
} |
| 23 |
|
| 24 |
// DexExpectStepKind('VERTICAL_BACKWARD', 2) |