]> granicus.if.org Git - clang/commitdiff
FileCheck'ize tests
authorDmitri Gribenko <gribozavr@gmail.com>
Sat, 9 Feb 2013 16:41:47 +0000 (16:41 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Sat, 9 Feb 2013 16:41:47 +0000 (16:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174815 91177308-0d34-0410-b5e6-96231b3b80d8

test/Preprocessor/macro_rescan.c
test/Preprocessor/macro_space.c
test/Preprocessor/print_line_count.c
test/Preprocessor/skipping_unclean.c

index 3a3854841cd9f2bfc443d8e30f903a8d0aef5ec6..83a1975b4e5f5b6112272214283a56a0c4304712 100644 (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);{{$}}
 
index 49a9a0fac2cf9582e011a7638e7a10494742294b..8a47a3b08f688561f7325238a5b275e9110d8843 100644 (file)
@@ -1,5 +1,6 @@
-// RUN: %clang_cc1 %s -E | grep '! ,'
+// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
 
 #define XX
 ! XX,
 
+// CHECK: {{^}}! ,{{$}}
index 6a02b0eede00a6e0d771cf40c9c78c4357d5fc7d..6ada93b24c49be927cc788dfbe58aaf0ae59490a 100644 (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{{$}}
+
index 52d1785030b6855764bda861e02f00fa54c30ee3..ce75b3990ea13b8c3c63731ba987a80c95fa91f7 100644 (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{{$}}