25 lines · cpp
1// Purpose:2// Test that \DexLimitSteps can be used without a condition (i.e. the3// breakpoint range is set any time from_line is stepped on).4//5// RUN: %dexter_regression_test_cxx_build %s -o %t6// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s7// CHECK: unconditional.cpp8 9int glob;10int 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 = 417}18 19// DexLimitSteps(from_line=ref('from'), to_line=ref('to'))20//// Unconditionally limit dexter's view of the program from line 'from' to21//// 'to'. Check for test=0, 1, 2 so that the test will fail if dexter sees22//// test=0 or test=4.23// DexExpectWatchValue('test', 1, 2, 3)24 25