1// Purpose:
2// Check that referencing an undefined label gives a useful error message.
3//
4// RUN: %dexter_regression_test_build %s -o %t
5// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
6//
7// CHECK: parser error:{{.*}}err_bad_label_ref.cpp(15): Unresolved label: 'label_does_not_exist'
8// CHECK-NEXT: {{Dex}}ExpectWatchValue('result', '0', on_line=ref('label_does_not_exist'))
9
10int main() {
11 int result = 0;
12 return result;
13}
14
15// DexExpectWatchValue('result', '0', on_line=ref('label_does_not_exist'))
16

source code of cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp