diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-02-09 16:41:47 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-02-09 16:41:47 +0000 |
commit | 8448e1a66582916a856c73e9763a1765a9c48288 (patch) | |
tree | f005bcb8aad6b4ddb0cec0d7102fbaa352340893 | |
parent | 559b7facde0aaa3d752fde2bc7ed6d764b3da501 (diff) |
FileCheck'ize tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174815 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Preprocessor/macro_rescan.c | 14 | ||||
-rw-r--r-- | test/Preprocessor/macro_space.c | 3 | ||||
-rw-r--r-- | test/Preprocessor/print_line_count.c | 5 | ||||
-rw-r--r-- | test/Preprocessor/skipping_unclean.c | 3 |
4 files changed, 16 insertions, 9 deletions
diff --git a/test/Preprocessor/macro_rescan.c b/test/Preprocessor/macro_rescan.c index 3a3854841c..83a1975b4e 100644 --- a/test/Preprocessor/macro_rescan.c +++ b/test/Preprocessor/macro_rescan.c @@ -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);{{$}} diff --git a/test/Preprocessor/macro_space.c b/test/Preprocessor/macro_space.c index 49a9a0fac2..8a47a3b08f 100644 --- a/test/Preprocessor/macro_space.c +++ b/test/Preprocessor/macro_space.c @@ -1,5 +1,6 @@ -// RUN: %clang_cc1 %s -E | grep '! ,' +// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s #define XX ! XX, +// CHECK: {{^}}! ,{{$}} diff --git a/test/Preprocessor/print_line_count.c b/test/Preprocessor/print_line_count.c index 6a02b0eede..6ada93b24c 100644 --- a/test/Preprocessor/print_line_count.c +++ b/test/Preprocessor/print_line_count.c @@ -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{{$}} + diff --git a/test/Preprocessor/skipping_unclean.c b/test/Preprocessor/skipping_unclean.c index 52d1785030..ce75b3990e 100644 --- a/test/Preprocessor/skipping_unclean.c +++ b/test/Preprocessor/skipping_unclean.c @@ -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{{$}} |