[llvm] r297672 - [Support] Follow-up for "Test directory iterators and recursive directory iterators with broken symlinks."

Juergen Ributzka via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 14:40:20 PDT 2017


Author: ributzka
Date: Mon Mar 13 16:40:20 2017
New Revision: 297672

URL: http://llvm.org/viewvc/llvm-project?rev=297672&view=rev
Log:
[Support] Follow-up for "Test directory iterators and recursive directory iterators with broken symlinks."

Fix the test by sorting the result vector.

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=297672&r1=297671&r2=297672&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/Path.cpp (original)
+++ llvm/trunk/unittests/Support/Path.cpp Mon Mar 13 16:40:20 2017
@@ -847,7 +847,7 @@ TEST_F(FileSystemTest, BrokenSymlinkDire
     ASSERT_NO_ERROR(ec);
     visited.push_back(path::filename(i->path()));
   }
-
+  std::sort(visited.begin(), visited.end());
   expected = {"a", "b", "ba", "bb", "bc", "c", "d", "da", "dd", "ddd", "e"};
   ASSERT_TRUE(visited.size() == expected.size());
   ASSERT_TRUE(std::equal(visited.begin(), visited.end(), expected.begin()));




More information about the llvm-commits mailing list