summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorMalcolm Parsons <malcolm.parsons@gmail.com>2016-12-07 20:38:20 +0000
committerMalcolm Parsons <malcolm.parsons@gmail.com>2016-12-07 20:38:20 +0000
commita29d98fcb5579fe1574ff94a8caf60073027dddd (patch)
tree9d5ec523d0acd1aaa39bc2b58edcabc6f5952cd4 /clang
parent007f9f3e3d5d255a5d4661da9712cb4e009e64d7 (diff)
downloadbcm5719-llvm-a29d98fcb5579fe1574ff94a8caf60073027dddd.tar.gz
bcm5719-llvm-a29d98fcb5579fe1574ff94a8caf60073027dddd.zip
[RecursiveASTVisitor] Improve post-order traversal unit test
llvm-svn: 288976
Diffstat (limited to 'clang')
-rw-r--r--clang/unittests/AST/PostOrderASTVisitor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/unittests/AST/PostOrderASTVisitor.cpp b/clang/unittests/AST/PostOrderASTVisitor.cpp
index ee17f14bd10..2921f3ead50 100644
--- a/clang/unittests/AST/PostOrderASTVisitor.cpp
+++ b/clang/unittests/AST/PostOrderASTVisitor.cpp
@@ -81,7 +81,7 @@ TEST(RecursiveASTVisitor, PostOrderTraversal) {
auto ASTUnit = tooling::buildASTFromCode(
"class A {"
" class B {"
- " int foo() { while(4) { int i = 9; int j = -i; } return (1 + 3) + 2; }"
+ " int foo() { while(4) { int i = 9; int j = -5; } return (1 + 3) + 2; }"
" };"
"};"
);
@@ -91,9 +91,9 @@ TEST(RecursiveASTVisitor, PostOrderTraversal) {
RecordingVisitor Visitor(true);
Visitor.TraverseTranslationUnitDecl(TU);
- std::vector<std::string> expected = {
- "4", "9", "i", "-", "j", "1", "3", "+", "2", "+", "return", "A::B::foo", "A::B", "A"
- };
+ std::vector<std::string> expected = {"4", "9", "i", "5", "-",
+ "j", "1", "3", "+", "2",
+ "+", "return", "A::B::foo", "A::B", "A"};
// Compare the list of actually visited nodes
// with the expected list of visited nodes.
ASSERT_EQ(expected.size(), Visitor.VisitedNodes.size());
OpenPOWER on IntegriCloud