cling/test/ErrorRecovery/SubsequentDecls.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

32 lines
845 B
C

// RUN: rm -f %testexecdir/ErrorRecovery/*.tmp
// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s
// Test the removal of decls which are stored in vector of redeclarables
.rawInput 1
extern int __my_i;
template<typename T> T TemplatedF(T t);
int OverloadedF(int i);
float OverloadedF(float f){ return f + 100.111f;}
double OverloadedF(double d){ return d + 10.11f; };
namespace test { int y = 0; }
.rawInput 0
.storeState "testSubsequentDecls"
#include "SubsequentDecls.h"
.compareState "testSubsequentDecls"
// CHECK-NOT: File with AST differencies stored in: testSubsequentDeclsAST.diff
.rawInput 1
template<> int TemplatedF(int i) { return i + 100; }
int OverloadedF(int i) { return i + 100;}
.rawInput 0
int __my_i = 10
// CHECK: (int) 10
OverloadedF(__my_i)
// CHECK: (int) 110
TemplatedF(__my_i)
// CHECK: (int) 110
.q