aboutsummaryrefslogtreecommitdiff
path: root/unittests/Support/Path.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-12-09 01:14:41 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-12-09 01:14:41 +0000
commitbd3825ecd1e7101ba8da024557e9f8d97686e70d (patch)
treebd7708349a1320e9c217a39cfac4b34794232ede /unittests/Support/Path.cpp
parent6132d70210d2ac01bbbabdb7a64d61b8e6070c71 (diff)
unittests/SupportTests: Fix test. pop modifies the current entry, thus the
dontlookhere check must be after it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support/Path.cpp')
-rw-r--r--unittests/Support/Path.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/unittests/Support/Path.cpp b/unittests/Support/Path.cpp
index 9099b72325..51c62f25d6 100644
--- a/unittests/Support/Path.cpp
+++ b/unittests/Support/Path.cpp
@@ -241,13 +241,10 @@ TEST_F(FileSystemTest, DirectoryIteration) {
for (fs::recursive_directory_iterator i(Twine(TestDirectory)
+ "/recursive", ec), e; i != e; i.increment(ec)){
ASSERT_NO_ERROR(ec);
- if (path::filename(i->path()) == "dontlookhere")
- i.no_push();
- outs() << "pre-pop: " << path::filename(i->path()) << "\n";
if (path::filename(i->path()) == "p1")
i.pop();
- outs() << "post-pop: " << path::filename(i->path()) << "\n";
- outs().flush();
+ if (path::filename(i->path()) == "dontlookhere")
+ i.no_push();
visited.push_back(path::filename(i->path()));
}
v_t::const_iterator a0 = std::find(visited.begin(), visited.end(), "a0");