1// Purpose:
2// Check that \DexExpectWatchValue applies no penalties when expected
3// values are found.
4//
5// UNSUPPORTED: system-darwin
6//
7// RUN: %dexter_regression_test_build %s -o %t
8// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
9// CHECK: expect_watch_value.cpp:
10
11unsigned long Factorial(int n) {
12 volatile unsigned long fac = 1; // DexLabel('entry')
13
14 for (int i = 1; i <= n; ++i)
15 fac *= i; // DexLabel('loop')
16
17 return fac; // DexLabel('ret')
18}
19
20int main()
21{
22 return Factorial(n: 8);
23}
24
25/*
26DexExpectWatchValue('n', '8', on_line=ref('entry'))
27DexExpectWatchValue('i',
28 '1', '2', '3', '4', '5', '6', '7', '8',
29 on_line=ref('loop'))
30
31DexExpectWatchValue('fac',
32 '1', '2', '6', '24', '120', '720', '5040',
33 on_line=ref('loop'))
34
35DexExpectWatchValue('n', '8', on_line=ref('loop'))
36DexExpectWatchValue('fac', '40320', on_line=ref('ret'))
37DexExpectWatchValue('n', '8', on_line=ref('ret'))
38*/
39

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