FileCheck'ize test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dmitri Gribenko 2013-01-24 23:44:04 +00:00
parent b8ccd43dbf
commit 5c9e20fed2
1 changed files with 7 additions and 6 deletions

View File

@ -1,16 +1,17 @@
// __COUNTER__ support: rdar://4329310
// RUN: %clang -E %s > %t
// RUN: %clang -E %s | FileCheck %s
#define PASTE2(x,y) x##y
#define PASTE1(x,y) PASTE2(x,y)
#define UNIQUE(x) PASTE1(x,__COUNTER__)
// RUN: grep "A: 0" %t
A: __COUNTER__
// RUN: grep "B: foo1" %t
B: UNIQUE(foo);
// RUN: grep "C: foo2" %t
C: UNIQUE(foo);
// RUN: grep "D: 3" %t
D: __COUNTER__
// CHECK: A: 0
// CHECK: B: foo1;
// CHECK: C: foo2;
// CHECK: D: 3