brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 58bdf40 Raw
53 lines · cpp
1// Purpose:2//      Check that \DexExpectWatchValue applies no penalties when expected3//      program states are found.4//5// UNSUPPORTED: system-darwin6//7//8// RUN: %dexter_regression_test_cxx_build %s -o %t9// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s10// CHECK: expect_program_state.cpp:11 12int GCD(int lhs, int rhs)13{14    if (rhs == 0)15        return lhs; // DexLabel('check')16    return GCD(rhs, lhs % rhs);17}18 19int main()20{21    return GCD(111, 259);22}23 24/*25DexExpectProgramState({26    'frames': [27        {28            'location': {29                'lineno': ref('check')30            },31            'watches': {32                'lhs': '37', 'rhs': '0'33            }34        },35        {36            'watches': {37                'lhs': {'value': '111'}, 'rhs': {'value': '37'}38            }39        },40        {41            'watches': {42                'lhs': {'value': '259'}, 'rhs': {'value': '111'}43            }44        },45        {46            'watches': {47                'lhs': {'value': '111'}, 'rhs': {'value': '259'}48            }49        }50    ]51})52*/53