1 | // Purpose: |
2 | // Check the DexLimit steps only gathers step info for 2 iterations of a |
3 | // for loop. |
4 | // |
5 | // RUN: %dexter_regression_test_build %s -o %t |
6 | // RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s |
7 | // CHECK: limit_steps_expect_loop.cpp: |
8 | |
9 | int main(const int argc, const char * argv[]) { |
10 | unsigned int sum = 1; |
11 | for(unsigned int ix = 0; ix != 5; ++ix) { |
12 | unsigned thing_to_add = ix + ix - ix; // DexLabel('start') |
13 | sum += ix; // DexLabel('end') |
14 | } |
15 | return sum; |
16 | } |
17 | |
18 | // DexLimitSteps('ix', 0, 3, from_line=ref('start'), to_line=ref('end')) |
19 | // DexExpectWatchValue('ix', 0, 3, from_line=ref('start'), to_line=ref('end')) |
20 | |