forked from OSchip/llvm-project
unittests/SupportTests: Fix test. pop modifies the current entry, thus the
dontlookhere check must be after it. llvm-svn: 146217
This commit is contained in:
parent
8f192cea00
commit
9b54a3e297
|
|
@ -241,13 +241,10 @@ TEST_F(FileSystemTest, DirectoryIteration) {
|
||||||
for (fs::recursive_directory_iterator i(Twine(TestDirectory)
|
for (fs::recursive_directory_iterator i(Twine(TestDirectory)
|
||||||
+ "/recursive", ec), e; i != e; i.increment(ec)){
|
+ "/recursive", ec), e; i != e; i.increment(ec)){
|
||||||
ASSERT_NO_ERROR(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")
|
if (path::filename(i->path()) == "p1")
|
||||||
i.pop();
|
i.pop();
|
||||||
outs() << "post-pop: " << path::filename(i->path()) << "\n";
|
if (path::filename(i->path()) == "dontlookhere")
|
||||||
outs().flush();
|
i.no_push();
|
||||||
visited.push_back(path::filename(i->path()));
|
visited.push_back(path::filename(i->path()));
|
||||||
}
|
}
|
||||||
v_t::const_iterator a0 = std::find(visited.begin(), visited.end(), "a0");
|
v_t::const_iterator a0 = std::find(visited.begin(), visited.end(), "a0");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue