FileCheck'ize tests

llvm-svn: 174815
This commit is contained in:
Dmitri Gribenko 2013-02-09 16:41:47 +00:00
parent f37d0cd780
commit 4b8a84fdca
4 changed files with 16 additions and 9 deletions

View File

@ -1,9 +1,11 @@
// RUN: %clang_cc1 -E %s | grep 'ei_1 = (17 +1);'
// RUN: %clang_cc1 -E %s | grep 'ei_2 = (M1)(17);'
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
#define M1(a) (a+1)
#define M2(b) b
#define M1(a) (a+1)
#define M2(b) b
int ei_1 = M2(M1)(17); /* becomes int ei_1 = (17+1); */
int ei_2 = (M2(M1))(17); /* becomes int ei_2 = (M1)(17); */
int ei_1 = M2(M1)(17);
// CHECK: {{^}}int ei_1 = (17 +1);{{$}}
int ei_2 = (M2(M1))(17);
// CHECK: {{^}}int ei_2 = (M1)(17);{{$}}

View File

@ -1,5 +1,6 @@
// RUN: %clang_cc1 %s -E | grep '! ,'
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
#define XX
! XX,
// CHECK: {{^}}! ,{{$}}

View File

@ -1,4 +1,7 @@
/* RUN: %clang -E -C -P %s | wc -l | grep 4
/* RUN: %clang -E -C -P %s | FileCheck --strict-whitespace %s
PR2741
comment */
y
// CHECK: {{^}} comment */{{$}}
// CHECK-NEXT: {{^}}y{{$}}

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -E %s | grep bark
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
#if 0
blah
@ -6,4 +6,5 @@ blah
else
bark
#endif
// CHECK: {{^}}bark{{$}}