1 | // Purpose: |
2 | // Test that \DexLimitSteps keyword argument hit_count correctly limits |
3 | // the number of times the command can trigger. |
4 | // |
5 | // RUN: %dexter_regression_test_build %s -o %t |
6 | // RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s |
7 | // CHECK: hit_count.cpp |
8 | |
9 | int a; |
10 | int main() { |
11 | for (int i = 0; i < 4; i++) { |
12 | a = i; // DexLabel('check') |
13 | } |
14 | return 0; |
15 | } |
16 | |
17 | //// Unconditionally limit dexter's view of the program to 'on_line' and check |
18 | //// for i=0, i=1. The test will fail if dexter sees any other value for test. |
19 | // DexLimitSteps(hit_count=2, on_line=ref('check')) |
20 | // DexExpectWatchValue('i', '0', '1') |
21 | |