From 2dc75ed2ef2fa3cbfd8b2ed88eb2369f3fcd98a9 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 24 Aug 2012 05:12:34 +0000 Subject: Rename the ASTMatchers to better match AST nodes. Now, all ASTMatchers have the same name as the corresponding AST nodes but are lower case. The only exceptions are the "CXX" prefixes which are not copied over to the matcher names as the goal is to actually remove these prefixes from the AST node names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162536 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Tooling/RefactoringCallbacksTest.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'unittests/Tooling/RefactoringCallbacksTest.cpp') diff --git a/unittests/Tooling/RefactoringCallbacksTest.cpp b/unittests/Tooling/RefactoringCallbacksTest.cpp index 00eb193d74..7add3856b2 100644 --- a/unittests/Tooling/RefactoringCallbacksTest.cpp +++ b/unittests/Tooling/RefactoringCallbacksTest.cpp @@ -40,28 +40,28 @@ TEST(RefactoringCallbacksTest, ReplacesStmtsWithString) { std::string Code = "void f() { int i = 1; }"; std::string Expected = "void f() { ; }"; ReplaceStmtWithText Callback("id", ";"); - expectRewritten(Code, Expected, id("id", declarationStatement()), Callback); + expectRewritten(Code, Expected, id("id", declStmt()), Callback); } TEST(RefactoringCallbacksTest, ReplacesStmtsInCalledMacros) { std::string Code = "#define A void f() { int i = 1; }\nA"; std::string Expected = "#define A void f() { ; }\nA"; ReplaceStmtWithText Callback("id", ";"); - expectRewritten(Code, Expected, id("id", declarationStatement()), Callback); + expectRewritten(Code, Expected, id("id", declStmt()), Callback); } TEST(RefactoringCallbacksTest, IgnoresStmtsInUncalledMacros) { std::string Code = "#define A void f() { int i = 1; }"; std::string Expected = "#define A void f() { int i = 1; }"; ReplaceStmtWithText Callback("id", ";"); - expectRewritten(Code, Expected, id("id", declarationStatement()), Callback); + expectRewritten(Code, Expected, id("id", declStmt()), Callback); } TEST(RefactoringCallbacksTest, ReplacesInteger) { std::string Code = "void f() { int i = 1; }"; std::string Expected = "void f() { int i = 2; }"; ReplaceStmtWithText Callback("id", "2"); - expectRewritten(Code, Expected, id("id", expression(integerLiteral())), + expectRewritten(Code, Expected, id("id", expr(integerLiteral())), Callback); } @@ -72,7 +72,7 @@ TEST(RefactoringCallbacksTest, ReplacesStmtWithStmt) { expectRewritten(Code, Expected, id("always-false", conditionalOperator( hasCondition(boolLiteral(equals(false))), - hasFalseExpression(id("should-be", expression())))), + hasFalseExpression(id("should-be", expr())))), Callback); } @@ -82,8 +82,8 @@ TEST(RefactoringCallbacksTest, ReplacesIfStmt) { ReplaceIfStmtWithItsBody Callback("id", true); expectRewritten(Code, Expected, id("id", ifStmt( - hasCondition(implicitCast(hasSourceExpression( - declarationReference(to(variable(hasName("a"))))))))), + hasCondition(implicitCastExpr(hasSourceExpression( + declRefExpr(to(varDecl(hasName("a"))))))))), Callback); } -- cgit v1.2.3-70-g09d2