[PATCH] D60326: Fix error in NamedDeclPrinterTest

2019-04-05 Thread David Goldman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rC357799: Fix error in NamedDeclPrinterTest (authored by 
dgoldman, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D60326?vs=193917=193935#toc

Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60326/new/

https://reviews.llvm.org/D60326

Files:
  unittests/AST/NamedDeclPrinterTest.cpp


Index: unittests/AST/NamedDeclPrinterTest.cpp
===
--- unittests/AST/NamedDeclPrinterTest.cpp
+++ unittests/AST/NamedDeclPrinterTest.cpp
@@ -193,29 +193,33 @@
 }
 
 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"));
 }


Index: unittests/AST/NamedDeclPrinterTest.cpp
===
--- unittests/AST/NamedDeclPrinterTest.cpp
+++ unittests/AST/NamedDeclPrinterTest.cpp
@@ -193,29 +193,33 @@
 }
 
 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"));
 }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D60326: Fix error in NamedDeclPrinterTest

2019-04-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

LG


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60326/new/

https://reviews.llvm.org/D60326



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D60326: Fix error in NamedDeclPrinterTest

2019-04-05 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision.
dgoldman added reviewers: sammccall, ilya-biryukov.
Herald added subscribers: cfe-commits, jfb.
Herald added a project: clang.

Caused by D56924 , shouldn't use raw string 
literals in macros.


Repository:
  rC Clang

https://reviews.llvm.org/D60326

Files:
  unittests/AST/NamedDeclPrinterTest.cpp


Index: unittests/AST/NamedDeclPrinterTest.cpp
===
--- unittests/AST/NamedDeclPrinterTest.cpp
+++ unittests/AST/NamedDeclPrinterTest.cpp
@@ -193,29 +193,33 @@
 }
 
 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"));
 }


Index: unittests/AST/NamedDeclPrinterTest.cpp
===
--- unittests/AST/NamedDeclPrinterTest.cpp
+++ unittests/AST/NamedDeclPrinterTest.cpp
@@ -193,29 +193,33 @@
 }
 
 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"));
 }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits