[cfe-commits] r173484 - in /cfe/trunk/test/Preprocessor: hash_line.c macro_expand.c

Dmitri Gribenko gribozavr at gmail.com
Fri Jan 25 12:34:08 PST 2013


Author: gribozavr
Date: Fri Jan 25 14:34:08 2013
New Revision: 173484

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

Modified:
    cfe/trunk/test/Preprocessor/hash_line.c
    cfe/trunk/test/Preprocessor/macro_expand.c

Modified: cfe/trunk/test/Preprocessor/hash_line.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/hash_line.c?rev=173484&r1=173483&r2=173484&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/hash_line.c (original)
+++ cfe/trunk/test/Preprocessor/hash_line.c Fri Jan 25 14:34:08 2013
@@ -1,7 +1,10 @@
 // The 1 and # should not go on the same line.
-// RUN: %clang_cc1 %s -E | not grep "1 #"
-// RUN: %clang_cc1 %s -E | grep '^1$'
-// RUN: %clang_cc1 %s -E | grep '^      #$'
+// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
+// CHECK-NOT: 1{{.*}}#
+// CHECK: {{^1$}}
+// CHECK-NOT: 1{{.*}}#
+// CHECK: {{^      #$}}
+// CHECK-NOT: 1{{.*}}#
 1
 #define EMPTY
 EMPTY #

Modified: cfe/trunk/test/Preprocessor/macro_expand.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_expand.c?rev=173484&r1=173483&r2=173484&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/macro_expand.c (original)
+++ cfe/trunk/test/Preprocessor/macro_expand.c Fri Jan 25 14:34:08 2013
@@ -1,11 +1,10 @@
-// RUN: %clang_cc1 -E %s | grep '^A: Y$'
-// RUN: %clang_cc1 -E %s | grep '^B: f()$'
-// RUN: %clang_cc1 -E %s | grep '^C: for()$'
+// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
 
 #define X() Y
 #define Y() X
 
 A: X()()()
+// CHECK: {{^}}A: Y{{$}}
 
 // PR3927
 #define f(x) h(x
@@ -14,6 +13,9 @@
 B: f(f))
 C: for(for))
 
+// CHECK: {{^}}B: f(){{$}}
+// CHECK: {{^}}C: for(){{$}}
+
 // rdar://6880648
 #define f(x,y...) y
 f()





More information about the cfe-commits mailing list