aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-04-08 16:40:30 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-04-08 16:40:30 +0000
commit65ea45a447c1862da654e3eb56bea80f89c0d5b7 (patch)
treea2f8e0085352b843e79ae2591cb32868ae0163ae
parent49149fe0d2be06ce1ceed1e9d2548a0b75a59c47 (diff)
FileCheck-ize this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154289 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Preprocessor/pic.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/test/Preprocessor/pic.c b/test/Preprocessor/pic.c
index ebc028ae17..a65cef8409 100644
--- a/test/Preprocessor/pic.c
+++ b/test/Preprocessor/pic.c
@@ -1,9 +1,12 @@
-// RUN: %clang -target i386-unknown-unknown -static -dM -E -o %t %s
-// RUN: grep '#define __PIC__' %t | count 0
-// RUN: grep '#define __pic__' %t | count 0
-// RUN: %clang -target i386-unknown-unknown -fpic -dM -E -o %t %s
-// RUN: grep '#define __PIC__ 1' %t | count 1
-// RUN: grep '#define __pic__ 1' %t | count 1
-// RUN: %clang -target i386-unknown-unknown -fPIC -dM -E -o %t %s
-// RUN: grep '#define __PIC__ 2' %t | count 1
-// RUN: grep '#define __pic__ 2' %t | count 1
+// RUN: %clang -target i386-unknown-unknown -static -dM -E -o - %s \
+// RUN: | FileCheck --check-prefix=CHECK-STATIC %s
+// CHECK-STATIC-NOT: #define __PIC__
+// CHECK-STATIC-NOT: #define __pic__
+// RUN: %clang -target i386-unknown-unknown -fpic -dM -E -o - %s \
+// RUN: | FileCheck --check-prefix=CHECK-LOWERPIC %s
+// CHECK-LOWERPIC: #define __PIC__ 1
+// CHECK-LOWERPIC: #define __pic__ 1
+// RUN: %clang -target i386-unknown-unknown -fPIC -dM -E -o - %s \
+// RUN: | FileCheck --check-prefix=CHECK-UPPERPIC %s
+// CHECK-UPPERPIC: #define __PIC__ 2
+// CHECK-UPPERPIC: #define __pic__ 2