|
@@ -544,6 +544,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl10) {
|
|
"};",
|
|
"};",
|
|
constructorDecl(ofClass(hasName("A"))).bind("id"),
|
|
constructorDecl(ofClass(hasName("A"))).bind("id"),
|
|
"A<T...>(const A<T...> &a)"));
|
|
"A<T...>(const A<T...> &a)"));
|
|
|
|
+ // WRONG; Should be: "A(const A<T...> &a);"
|
|
}
|
|
}
|
|
|
|
|
|
TEST(DeclPrinter, TestCXXConstructorDecl11) {
|
|
TEST(DeclPrinter, TestCXXConstructorDecl11) {
|
|
@@ -553,8 +554,8 @@ TEST(DeclPrinter, TestCXXConstructorDecl11) {
|
|
" A(T&&... ts) : T(ts)... {}"
|
|
" A(T&&... ts) : T(ts)... {}"
|
|
"};",
|
|
"};",
|
|
constructorDecl(ofClass(hasName("A"))).bind("id"),
|
|
constructorDecl(ofClass(hasName("A"))).bind("id"),
|
|
- "A<T...>(T &&ts...) : T(ts)..."));
|
|
|
|
- // WRONG; Should be: "A(T&&... ts) : T(ts)..."
|
|
|
|
|
|
+ "A<T...>(T &&...ts) : T(ts)..."));
|
|
|
|
+ // WRONG; Should be: "A(T &&...ts) : T(ts)... {}"
|
|
}
|
|
}
|
|
|
|
|
|
TEST(DeclPrinter, TestCXXDestructorDecl1) {
|
|
TEST(DeclPrinter, TestCXXDestructorDecl1) {
|
|
@@ -1011,8 +1012,8 @@ TEST(DeclPrinter, TestClassTemplateDecl10) {
|
|
"template<typename... T>"
|
|
"template<typename... T>"
|
|
"struct A { int a; };",
|
|
"struct A { int a; };",
|
|
classTemplateDecl(hasName("A")).bind("id"),
|
|
classTemplateDecl(hasName("A")).bind("id"),
|
|
- "template <typename ... T> struct A {\n}"));
|
|
|
|
- // Should be: with semicolon, with { ... }, without spaces before '...'
|
|
|
|
|
|
+ "template <typename ...T> struct A {\n}"));
|
|
|
|
+ // Should be: with semicolon, with { ... }
|
|
}
|
|
}
|
|
|
|
|
|
TEST(DeclPrinter, TestClassTemplateDecl11) {
|
|
TEST(DeclPrinter, TestClassTemplateDecl11) {
|
|
@@ -1020,8 +1021,8 @@ TEST(DeclPrinter, TestClassTemplateDecl11) {
|
|
"template<typename... T>"
|
|
"template<typename... T>"
|
|
"struct A : public T... { int a; };",
|
|
"struct A : public T... { int a; };",
|
|
classTemplateDecl(hasName("A")).bind("id"),
|
|
classTemplateDecl(hasName("A")).bind("id"),
|
|
- "template <typename ... T> struct A : public T... {\n}"));
|
|
|
|
- // Should be: with semicolon, with { ... }, without spaces before '...'
|
|
|
|
|
|
+ "template <typename ...T> struct A : public T... {\n}"));
|
|
|
|
+ // Should be: with semicolon, with { ... }
|
|
}
|
|
}
|
|
|
|
|
|
TEST(DeclPrinter, TestClassTemplatePartialSpecializationDecl1) {
|
|
TEST(DeclPrinter, TestClassTemplatePartialSpecializationDecl1) {
|
|
@@ -1080,9 +1081,7 @@ TEST(DeclPrinter, TestFunctionTemplateDecl3) {
|
|
"template<typename... T>"
|
|
"template<typename... T>"
|
|
"void A(T... a);",
|
|
"void A(T... a);",
|
|
functionTemplateDecl(hasName("A")).bind("id"),
|
|
functionTemplateDecl(hasName("A")).bind("id"),
|
|
- "template <typename ... T> void A(T a...)"));
|
|
|
|
- // WRONG; Should be: "template <typename ... T> void A(T... a)"
|
|
|
|
- // (not "T a...")
|
|
|
|
|
|
+ "template <typename ...T> void A(T ...a)"));
|
|
// Should be: with semicolon.
|
|
// Should be: with semicolon.
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1239,7 +1238,7 @@ TEST(DeclPrinter, TestTemplateArgumentList13) {
|
|
"};",
|
|
"};",
|
|
"A",
|
|
"A",
|
|
"Z<T...> A"));
|
|
"Z<T...> A"));
|
|
- // Should be: with semicolon, without extra space in "> >"
|
|
|
|
|
|
+ // Should be: with semicolon
|
|
}
|
|
}
|
|
|
|
|
|
TEST(DeclPrinter, TestTemplateArgumentList14) {
|
|
TEST(DeclPrinter, TestTemplateArgumentList14) {
|
|
@@ -1251,7 +1250,7 @@ TEST(DeclPrinter, TestTemplateArgumentList14) {
|
|
"};",
|
|
"};",
|
|
"A",
|
|
"A",
|
|
"Z<Y<T>...> A"));
|
|
"Z<Y<T>...> A"));
|
|
- // Should be: with semicolon, without extra space in "> >"
|
|
|
|
|
|
+ // Should be: with semicolon
|
|
}
|
|
}
|
|
|
|
|
|
TEST(DeclPrinter, TestTemplateArgumentList15) {
|
|
TEST(DeclPrinter, TestTemplateArgumentList15) {
|
|
@@ -1262,7 +1261,7 @@ TEST(DeclPrinter, TestTemplateArgumentList15) {
|
|
"};",
|
|
"};",
|
|
"A",
|
|
"A",
|
|
"Z<sizeof...(T)> A"));
|
|
"Z<sizeof...(T)> A"));
|
|
- // Should be: with semicolon, without extra space in "> >"
|
|
|
|
|
|
+ // Should be: with semicolon
|
|
}
|
|
}
|
|
|
|
|
|
TEST(DeclPrinter, TestObjCMethod1) {
|
|
TEST(DeclPrinter, TestObjCMethod1) {
|