[llvm-commits] [llvm] r146217 - /llvm/trunk/unittests/Support/Path.cpp

Michael J. Spencer bigcheesegs at gmail.com
Thu Dec 8 17:14:41 PST 2011


Author: mspencer
Date: Thu Dec  8 19:14:41 2011
New Revision: 146217

URL: http://llvm.org/viewvc/llvm-project?rev=146217&view=rev
Log:
unittests/SupportTests: Fix test. pop modifies the current entry, thus the
dontlookhere check must be after it.

Modified:
    llvm/trunk/unittests/Support/Path.cpp

Modified: llvm/trunk/unittests/Support/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Path.cpp?rev=146217&r1=146216&r2=146217&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/Path.cpp (original)
+++ llvm/trunk/unittests/Support/Path.cpp Thu Dec  8 19:14:41 2011
@@ -241,13 +241,10 @@
   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");





More information about the llvm-commits mailing list