r174815 - FileCheck'ize tests

Dmitri Gribenko gribozavr at gmail.com
Sat Feb 9 08:41:47 PST 2013


Author: gribozavr
Date: Sat Feb  9 10:41:47 2013
New Revision: 174815

URL: http://llvm.org/viewvc/llvm-project?rev=174815&view=rev
Log:
FileCheck'ize tests

Modified:
    cfe/trunk/test/Preprocessor/macro_rescan.c
    cfe/trunk/test/Preprocessor/macro_space.c
    cfe/trunk/test/Preprocessor/print_line_count.c
    cfe/trunk/test/Preprocessor/skipping_unclean.c

Modified: cfe/trunk/test/Preprocessor/macro_rescan.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_rescan.c?rev=174815&r1=174814&r2=174815&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/macro_rescan.c (original)
+++ cfe/trunk/test/Preprocessor/macro_rescan.c Sat Feb  9 10:41:47 2013
@@ -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);{{$}}
 

Modified: cfe/trunk/test/Preprocessor/macro_space.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_space.c?rev=174815&r1=174814&r2=174815&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/macro_space.c (original)
+++ cfe/trunk/test/Preprocessor/macro_space.c Sat Feb  9 10:41:47 2013
@@ -1,5 +1,6 @@
-// RUN: %clang_cc1 %s -E | grep '! ,'
+// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
 
 #define XX
 ! XX,
 
+// CHECK: {{^}}! ,{{$}}

Modified: cfe/trunk/test/Preprocessor/print_line_count.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/print_line_count.c?rev=174815&r1=174814&r2=174815&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/print_line_count.c (original)
+++ cfe/trunk/test/Preprocessor/print_line_count.c Sat Feb  9 10:41:47 2013
@@ -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{{$}}
+

Modified: cfe/trunk/test/Preprocessor/skipping_unclean.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/skipping_unclean.c?rev=174815&r1=174814&r2=174815&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/skipping_unclean.c (original)
+++ cfe/trunk/test/Preprocessor/skipping_unclean.c Sat Feb  9 10:41:47 2013
@@ -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{{$}}
 





More information about the cfe-commits mailing list