[libc++] Remove incorrect assertion in the filesystem tests
authorLouis Dionne <ldionne@apple.com>
Tue, 31 Mar 2020 14:05:34 +0000 (10:05 -0400)
committerLouis Dionne <ldionne@apple.com>
Tue, 31 Mar 2020 14:07:48 +0000 (10:07 -0400)
Based on the current discussion in https://llvm.org/PR45307, it seems
that it's legitimate for `temp_directory_path()` to return a path with
a trailing slash. Since `p.parent_path()` will never contain a trailing
slash, comparing it to the result of `temp_directory_path()` will fail
depending on whether `temp_directory_path()` returns a trailing slash
or not.

libcxx/test/support/filesystem_test_helper.h

index d927787..ef66405 100644 (file)
@@ -251,7 +251,6 @@ private:
     static inline fs::path random_path() {
         fs::path tmp = fs::temp_directory_path();
         fs::path p = fs::path(tmp) / unique_path_suffix();
-        assert(p.parent_path() == tmp);
         return p;
     }