cling/test/ErrorRecovery/MacroExpansion.C
Jerome Beclin 162101dd9d Instrument the error recovery testsuite with .store- and .compare- State.
Add a special lit substitution giving us the executed test folder, so that
before next run we could cleanup.
2013-08-21 14:29:57 +02:00

20 lines
617 B
C

// RUN: rm -f %testexecdir/ErrorRecovery/*.tmp
// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s
#define BEGIN_NAMESPACE namespace test_namespace {
#define END_NAMESPACE }
.storeState "testMacroExpansion"
.rawInput 1
BEGIN_NAMESPACE int j; END_NAMESPACE
BEGIN_NAMESPACE int j; END_NAMESPACE // expected-error {{redefinition of 'j'}} expected-note {{previous definition is here}}
.rawInput 0
.compareState "testMacroExpansion"
// CHECK-NOT: File with AST differencies stored in: testMacroExpansionAST.diff
// Make FileCheck happy with having at least one positive rule:
int a = 5
// CHECK: (int) 5
.q