aboutsummaryrefslogtreecommitdiff
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
commit9b54a3e297f9035e2e23f26d0a68bc4115c90ee0 (patch)
tree17f9eab3733b1e23d9dbcef91566d78cab2fe529
parent8f192cea00df7865da1aab672344c4091676641e (diff)
downloadllvm-9b54a3e297f9035e2e23f26d0a68bc4115c90ee0.zip
llvm-9b54a3e297f9035e2e23f26d0a68bc4115c90ee0.tar.gz
llvm-9b54a3e297f9035e2e23f26d0a68bc4115c90ee0.tar.bz2
unittests/SupportTests: Fix test. pop modifies the current entry, thus the
dontlookhere check must be after it. llvm-svn: 146217
-rw-r--r--llvm/unittests/Support/Path.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index 9099b72..51c62f2 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/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");