diff options
Diffstat (limited to 'unittests/AST/DeclPrinterTest.cpp')
-rw-r--r-- | unittests/AST/DeclPrinterTest.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/unittests/AST/DeclPrinterTest.cpp b/unittests/AST/DeclPrinterTest.cpp index d8cb977..d06fbfe 100644 --- a/unittests/AST/DeclPrinterTest.cpp +++ b/unittests/AST/DeclPrinterTest.cpp @@ -471,7 +471,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl1) { "struct A {" " A();" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "A()")); } @@ -480,7 +480,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl2) { "struct A {" " A(int a);" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "A(int a)")); } @@ -489,7 +489,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl3) { "struct A {" " A(const A &a);" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "A(const A &a)")); } @@ -498,7 +498,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl4) { "struct A {" " A(const A &a, int = 0);" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "A(const A &a, int = 0)")); } @@ -507,7 +507,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl5) { "struct A {" " A(const A &&a);" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "A(const A &&a)")); } @@ -516,7 +516,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl6) { "struct A {" " explicit A(int a);" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "explicit A(int a)")); } @@ -525,7 +525,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl7) { "struct A {" " constexpr A();" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "constexpr A()")); } @@ -534,7 +534,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl8) { "struct A {" " A() = default;" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "A() = default")); } @@ -543,7 +543,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl9) { "struct A {" " A() = delete;" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "A() = delete")); } @@ -553,7 +553,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl10) { "struct A {" " A(const A &a);" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "A<T...>(const A<T...> &a)")); // WRONG; Should be: "A(const A<T...> &a);" } @@ -564,7 +564,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl11) { "struct A : public T... {" " A(T&&... ts) : T(ts)... {}" "};", - constructorDecl(ofClass(hasName("A"))).bind("id"), + cxxConstructorDecl(ofClass(hasName("A"))).bind("id"), "A<T...>(T &&...ts) : T(ts)...")); // WRONG; Should be: "A(T &&...ts) : T(ts)... {}" } @@ -574,7 +574,7 @@ TEST(DeclPrinter, TestCXXDestructorDecl1) { "struct A {" " ~A();" "};", - destructorDecl(ofClass(hasName("A"))).bind("id"), + cxxDestructorDecl(ofClass(hasName("A"))).bind("id"), "~A()")); } @@ -583,7 +583,7 @@ TEST(DeclPrinter, TestCXXDestructorDecl2) { "struct A {" " virtual ~A();" "};", - destructorDecl(ofClass(hasName("A"))).bind("id"), + cxxDestructorDecl(ofClass(hasName("A"))).bind("id"), "virtual ~A()")); } @@ -592,7 +592,7 @@ TEST(DeclPrinter, TestCXXConversionDecl1) { "struct A {" " operator int();" "};", - methodDecl(ofClass(hasName("A"))).bind("id"), + cxxMethodDecl(ofClass(hasName("A"))).bind("id"), "operator int()")); } @@ -601,7 +601,7 @@ TEST(DeclPrinter, TestCXXConversionDecl2) { "struct A {" " operator bool();" "};", - methodDecl(ofClass(hasName("A"))).bind("id"), + cxxMethodDecl(ofClass(hasName("A"))).bind("id"), "operator bool()")); } @@ -611,7 +611,7 @@ TEST(DeclPrinter, TestCXXConversionDecl3) { "struct A {" " operator Z();" "};", - methodDecl(ofClass(hasName("A"))).bind("id"), + cxxMethodDecl(ofClass(hasName("A"))).bind("id"), "operator Z()")); } @@ -621,7 +621,7 @@ TEST(DeclPrinter, TestCXXMethodDecl_AllocationFunction1) { "struct Z {" " void *operator new(std::size_t);" "};", - methodDecl(ofClass(hasName("Z"))).bind("id"), + cxxMethodDecl(ofClass(hasName("Z"))).bind("id"), "void *operator new(std::size_t)")); // Should be: with semicolon } @@ -632,7 +632,7 @@ TEST(DeclPrinter, TestCXXMethodDecl_AllocationFunction2) { "struct Z {" " void *operator new[](std::size_t);" "};", - methodDecl(ofClass(hasName("Z"))).bind("id"), + cxxMethodDecl(ofClass(hasName("Z"))).bind("id"), "void *operator new[](std::size_t)")); // Should be: with semicolon } @@ -642,7 +642,7 @@ TEST(DeclPrinter, TestCXXMethodDecl_AllocationFunction3) { "struct Z {" " void operator delete(void *);" "};", - methodDecl(ofClass(hasName("Z"))).bind("id"), + cxxMethodDecl(ofClass(hasName("Z"))).bind("id"), "void operator delete(void *) noexcept")); // Should be: with semicolon, without noexcept? } @@ -652,7 +652,7 @@ TEST(DeclPrinter, TestCXXMethodDecl_AllocationFunction4) { "struct Z {" " void operator delete(void *);" "};", - methodDecl(ofClass(hasName("Z"))).bind("id"), + cxxMethodDecl(ofClass(hasName("Z"))).bind("id"), "void operator delete(void *)")); // Should be: with semicolon } @@ -662,7 +662,7 @@ TEST(DeclPrinter, TestCXXMethodDecl_AllocationFunction5) { "struct Z {" " void operator delete[](void *);" "};", - methodDecl(ofClass(hasName("Z"))).bind("id"), + cxxMethodDecl(ofClass(hasName("Z"))).bind("id"), "void operator delete[](void *) noexcept")); // Should be: with semicolon, without noexcept? } @@ -690,7 +690,7 @@ TEST(DeclPrinter, TestCXXMethodDecl_Operator1) { ASSERT_TRUE(PrintedDeclCXX98Matches( Code, - methodDecl(ofClass(hasName("Z"))).bind("id"), + cxxMethodDecl(ofClass(hasName("Z"))).bind("id"), Expected)); } } @@ -714,7 +714,7 @@ TEST(DeclPrinter, TestCXXMethodDecl_Operator2) { ASSERT_TRUE(PrintedDeclCXX98Matches( Code, - methodDecl(ofClass(hasName("Z"))).bind("id"), + cxxMethodDecl(ofClass(hasName("Z"))).bind("id"), Expected)); } } |