diff options
author | Daniel Jasper <djasper@google.com> | 2012-10-01 15:05:34 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2012-10-01 15:05:34 +0000 |
commit | 1a00fee3933066024a2398f9456e5d6bc74344b9 (patch) | |
tree | ad44e6b7c410cc85408bd50a0a6e6ed03fe575c2 | |
parent | 31f7c08a0d2b140bf31a08894d1948649de53c15 (diff) |
Fix ASTMatchersTests in configurations where
"#include <initializer_list>" is unavailable for whatever reason.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164944 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | unittests/ASTMatchers/ASTMatchersTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unittests/ASTMatchers/ASTMatchersTest.cpp b/unittests/ASTMatchers/ASTMatchersTest.cpp index 6698e4ecbc..d8f5511d6d 100644 --- a/unittests/ASTMatchers/ASTMatchersTest.cpp +++ b/unittests/ASTMatchers/ASTMatchersTest.cpp @@ -811,8 +811,8 @@ TEST(Matcher, Lambda) { } TEST(Matcher, ForRange) { - EXPECT_TRUE(matches("#include <initializer_list>\n" - "void f() { for (auto &a : {1, 2, 3}); }", + EXPECT_TRUE(matches("int as[] = { 1, 2, 3 };" + "void f() { for (auto &a : as); }", forRangeStmt())); EXPECT_TRUE(notMatches("void f() { for (int i; i<5; ++i); }", forRangeStmt())); @@ -2006,8 +2006,8 @@ TEST(AstPolymorphicMatcherPMacro, Works) { TEST(For, FindsForLoops) { EXPECT_TRUE(matches("void f() { for(;;); }", forStmt())); EXPECT_TRUE(matches("void f() { if(true) for(;;); }", forStmt())); - EXPECT_TRUE(notMatches("#include <initializer_list>\n" - "void f() { for (auto &a : {1, 2, 3}); }", + EXPECT_TRUE(notMatches("int as[] = { 1, 2, 3 };" + "void f() { for (auto &a : as); }", forStmt())); } |