DeclPrinter tests: add two more tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162511 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/AST/DeclPrinterTest.cpp b/unittests/AST/DeclPrinterTest.cpp
index 268d48e..b26ed93 100644
--- a/unittests/AST/DeclPrinterTest.cpp
+++ b/unittests/AST/DeclPrinterTest.cpp
@@ -498,6 +498,29 @@
// WRONG; Should be: "A() = delete;"
}
+TEST(DeclPrinter, TestCXXConstructorDecl10) {
+ ASSERT_TRUE(PrintedDeclCXX11Matches(
+ "template<typename... T>"
+ "struct A {"
+ " A(const A &a);"
+ "};",
+ constructor(ofClass(hasName("A"))).bind("id"),
+ ""));
+ // WRONG; Should be: "A(const A &a);"
+}
+
+TEST(DeclPrinter, TestCXXConstructorDecl11) {
+ ASSERT_TRUE(PrintedDeclCXX11Matches(
+ "template<typename... T>"
+ "struct A : public T... {"
+ " A(T&&... ts) : T(ts)... {}"
+ "};",
+ constructor(ofClass(hasName("A"))).bind("id"),
+ "A<T...>(T &&ts...) : T(ts)"));
+ // Should be: "A(T&&... ts) : T(ts)..."
+}
+
+
TEST(DeclPrinter, TestCXXDestructorDecl1) {
ASSERT_TRUE(PrintedDeclMatches(
"struct A {"