]> granicus.if.org Git - clang/commitdiff
Improve test to make sure -fixit is really working.
authorDaniel Dunbar <daniel@zuster.org>
Sat, 14 Nov 2009 19:25:21 +0000 (19:25 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 14 Nov 2009 19:25:21 +0000 (19:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88801 91177308-0d34-0410-b5e6-96231b3b80d8

test/FixIt/fixit.c

index d14213df7123c76498357e56ca31824184b7e471..1f085e4f0edd3e92b98d29fefd3d6eee03a82720 100644 (file)
@@ -1,4 +1,6 @@
-// RUN: clang-cc -pedantic -fixit %s -o - | clang-cc -pedantic -Werror -x c -
+// RUN: clang-cc -pedantic -fixit %s -o - | grep -v 'CHECK' > %t
+// RUN: clang-cc -pedantic -Werror -x c -
+// RUN: FileCheck -input-file=%t %s
 
 /* This is a test of the various code modification hints that are
    provided as part of warning or extension diagnostics. All of the
@@ -12,9 +14,13 @@ struct s {
   int x, y;;
 };
 
+// CHECK: _Complex double cd;
 _Complex cd;
 
+// CHECK: struct s s0 = { .y = 5 };
 struct s s0 = { y: 5 };
+
+// CHECK: int array0[5] = { [3] = 3 };
 int array0[5] = { [3] 3 };
 
 void f1(x, y) 
@@ -25,5 +31,7 @@ int i0 = { 17 };
 
 int f2(const char *my_string) {
   // FIXME: terminal output isn't so good when "my_string" is shorter
+// CHECK: return strcmp(my_string , "foo") == 0;
   return my_string == "foo";
 }
+