]> granicus.if.org Git - clang/commitdiff
Fix error in NamedDeclPrinterTest
authorDavid Goldman <dallasftball@gmail.com>
Fri, 5 Apr 2019 19:17:24 +0000 (19:17 +0000)
committerDavid Goldman <dallasftball@gmail.com>
Fri, 5 Apr 2019 19:17:24 +0000 (19:17 +0000)
Caused by D56924, shouldn't use raw string literals in macros.

Differential Revision: https://reviews.llvm.org/D60326

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

unittests/AST/NamedDeclPrinterTest.cpp

index d97299bc1910f9c018ce245f56d9fa4aa2fbc78f..a50626517f619a5d74e2502d0fd725ece7448a60 100644 (file)
@@ -193,29 +193,33 @@ TEST(NamedDeclPrinter, TestLinkageInNamespace) {
 }
 
 TEST(NamedDeclPrinter, TestObjCClassExtension) {
+  const char *Code =
+R"(
+  @interface Obj
+  @end
+
+  @interface Obj ()
+  @property(nonatomic) int property;
+  @end
+)";
   ASSERT_TRUE(PrintedWrittenPropertyDeclObjCMatches(
-    R"(
-      @interface Obj
-      @end
-
-      @interface Obj ()
-      @property(nonatomic) int property;
-      @end
-    )",
+    Code,
     "property",
     "Obj::property"));
 }
 
 TEST(NamedDeclPrinter, TestObjCClassExtensionWithGetter) {
+  const char *Code =
+R"(
+  @interface Obj
+  @end
+
+  @interface Obj ()
+  @property(nonatomic, getter=myPropertyGetter) int property;
+  @end
+)";
   ASSERT_TRUE(PrintedWrittenPropertyDeclObjCMatches(
-    R"(
-      @interface Obj
-      @end
-
-      @interface Obj ()
-      @property(nonatomic, getter=myPropertyGetter) int property;
-      @end
-    )",
+    Code,
     "property",
     "Obj::property"));
 }