summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/unittests/AST/NamedDeclPrinterTest.cpp36
1 files changed, 20 insertions, 16 deletions
diff --git a/clang/unittests/AST/NamedDeclPrinterTest.cpp b/clang/unittests/AST/NamedDeclPrinterTest.cpp
index d97299bc191..a50626517f6 100644
--- a/clang/unittests/AST/NamedDeclPrinterTest.cpp
+++ b/clang/unittests/AST/NamedDeclPrinterTest.cpp
@@ -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"));
}
OpenPOWER on IntegriCloud