| 1 | // Purpose: |
| 2 | // Test that \DexLimitSteps can be used without a condition (i.e. the |
| 3 | // breakpoint range is set any time from_line is stepped on). |
| 4 | // |
| 5 | // RUN: %dexter_regression_test_cxx_build %s -o %t |
| 6 | // RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s |
| 7 | // CHECK: unconditional.cpp |
| 8 | |
| 9 | int glob; |
| 10 | int main() { |
| 11 | int test = 0; |
| 12 | for (test = 1; test < 4; test++) { |
| 13 | glob += test; // DexLabel('from') |
| 14 | glob += test; // DexLabel('to') |
| 15 | } |
| 16 | return test; // test = 4 |
| 17 | } |
| 18 | |
| 19 | // DexLimitSteps(from_line=ref('from'), to_line=ref('to')) |
| 20 | //// Unconditionally limit dexter's view of the program from line 'from' to |
| 21 | //// 'to'. Check for test=0, 1, 2 so that the test will fail if dexter sees |
| 22 | //// test=0 or test=4. |
| 23 | // DexExpectWatchValue('test', 1, 2, 3) |
| 24 | |
| 25 | |