diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-12-05 19:54:11 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-12-05 19:54:11 +0000 |
commit | 14ef4790d17c35197e97e6936f0edd1bbf686e3b (patch) | |
tree | b6f92ba648bb3e780c817b56d3e8c40d334e774e /clang/unittests/AST/DeclPrinterTest.cpp | |
parent | ed92815cb0267839b4a31d9224848f24fe9c1b42 (diff) | |
download | bcm5719-llvm-14ef4790d17c35197e97e6936f0edd1bbf686e3b.tar.gz bcm5719-llvm-14ef4790d17c35197e97e6936f0edd1bbf686e3b.zip |
Testing C++ declarations embedded in
<declaration> tag of Comment XML.
Added DeclPrint support for constructors
and fix tests accordingly.
This is wip. // rdar://12378714
llvm-svn: 169412
Diffstat (limited to 'clang/unittests/AST/DeclPrinterTest.cpp')
-rw-r--r-- | clang/unittests/AST/DeclPrinterTest.cpp | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/clang/unittests/AST/DeclPrinterTest.cpp b/clang/unittests/AST/DeclPrinterTest.cpp index a2fc839b9c8..a770022e054 100644 --- a/clang/unittests/AST/DeclPrinterTest.cpp +++ b/clang/unittests/AST/DeclPrinterTest.cpp @@ -412,8 +412,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl1) { " A();" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - "")); - // WRONG; Should be: "A();" + "A()")); } TEST(DeclPrinter, TestCXXConstructorDecl2) { @@ -422,8 +421,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl2) { " A(int a);" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - "")); - // WRONG; Should be: "A(int a);" + "A(int a)")); } TEST(DeclPrinter, TestCXXConstructorDecl3) { @@ -432,8 +430,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl3) { " A(const A &a);" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - "")); - // WRONG; Should be: "A(const A &a);" + "A(const A &a)")); } TEST(DeclPrinter, TestCXXConstructorDecl4) { @@ -442,8 +439,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl4) { " A(const A &a, int = 0);" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - "")); - // WRONG; Should be: "A(const A &a, int = 0);" + "A(const A &a, int = 0)")); } TEST(DeclPrinter, TestCXXConstructorDecl5) { @@ -452,8 +448,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl5) { " A(const A &&a);" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - "")); - // WRONG; Should be: "A(const A &&a);" + "A(const A &&a)")); } TEST(DeclPrinter, TestCXXConstructorDecl6) { @@ -462,7 +457,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl6) { " explicit A(int a);" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - "")); + "A(int a)")); // WRONG; Should be: "explicit A(int a);" } @@ -472,7 +467,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl7) { " constexpr A();" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - "")); + "A()")); // WRONG; Should be: "constexpr A();" } @@ -482,8 +477,8 @@ TEST(DeclPrinter, TestCXXConstructorDecl8) { " A() = default;" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - "")); - // WRONG; Should be: "A() = default;" + "A() noexcept")); + // WRONG; Should be: "A() = delete;" } TEST(DeclPrinter, TestCXXConstructorDecl9) { @@ -492,8 +487,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl9) { " A() = delete;" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - " = delete")); - // WRONG; Should be: "A() = delete;" + "A() = delete")); } TEST(DeclPrinter, TestCXXConstructorDecl10) { @@ -503,8 +497,7 @@ TEST(DeclPrinter, TestCXXConstructorDecl10) { " A(const A &a);" "};", constructorDecl(ofClass(hasName("A"))).bind("id"), - "")); - // WRONG; Should be: "A(const A &a);" + "A<T...>(const A<T...> &a)")); } #if !defined(_MSC_VER) |