]> granicus.if.org Git - clang/commitdiff
Weaken Unicode fixit test to work even if the character is printed escaped.
authorJordan Rose <jordan_rose@apple.com>
Mon, 16 Jul 2012 22:18:33 +0000 (22:18 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 16 Jul 2012 22:18:33 +0000 (22:18 +0000)
This should fix the failure on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160324 91177308-0d34-0410-b5e6-96231b3b80d8

test/FixIt/fixit-unicode.c

index fdacfd0a08f5b48a0d3ec8402b63e98fab7557f3..2af5e08faa41f3cc0e3a4597b45c6b3e7222ffd7 100644 (file)
@@ -1,6 +1,5 @@
 // RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -strict-whitespace %s
 // RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck -check-prefix=CHECK-MACHINE %s
-// XFAIL: win32
 
 struct Foo {
   int bar;
@@ -24,9 +23,11 @@ void test2() {
   printf("∆: %d", 1L);
 // CHECK: warning: format specifies type 'int' but the argument has type 'long'
 // Don't crash emitting a fixit after the delta.
-//     CHECK-NEXT:  printf("∆: %d", 1L);
-// CHECK-NEXT: {{^             ~~   \^~}}
-// CHECK-NEXT: {{^             %ld}}
+// CHECK:  printf("
+// CHECK: : %d", 1L);
+// Unfortunately, we can't actually check the location of the printed fixit,
+// because different systems will render the delta differently (either as a
+// character, or as <U+2206>.) The fixit should line up with the %d regardless.
 
 // CHECK-MACHINE: fix-it:"{{.*}}fixit-unicode.c":{23:16-23:18}:"%ld"
 }