39 lines · cpp
1// Purpose:2// Check that \DexExpectWatchValue applies no penalties when expected3// values are found.4//5// UNSUPPORTED: system-darwin6//7// RUN: %dexter_regression_test_cxx_build %s -o %t8// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s9// 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(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