1// Purpose:
2// Test that \DexFinishTest can be used with a condition, so the test exits
3// when the line referenced by \DexFinishTest is stepped on and the given
4// condition (x == 5) is satisfied.
5// Test using the conditional controller (using \DexLimitSteps).
6//
7// The dbgeng driver doesn't support \DexLimitSteps yet.
8// UNSUPPORTED: system-windows
9//
10// RUN: %dexter_regression_test_build %s -o %t
11// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
12// CHECK: limit_steps_conditional.cpp
13
14int main() {
15 for (int x = 0; x < 10; ++x)
16 (void)0; // DexLabel('finish_line')
17}
18
19// DexLimitSteps(on_line=ref('finish_line'))
20// DexFinishTest('x', 5, on_line=ref('finish_line'))
21// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 5)
22

source code of cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional.cpp