diff options
Diffstat (limited to 'libcxx/test/std/experimental/filesystem/class.path/path.member/path.compare.pass.cpp')
-rw-r--r-- | libcxx/test/std/experimental/filesystem/class.path/path.member/path.compare.pass.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.compare.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.compare.pass.cpp index ea356782678..a2af094128d 100644 --- a/libcxx/test/std/experimental/filesystem/class.path/path.member/path.compare.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/class.path/path.member/path.compare.pass.cpp @@ -26,6 +26,7 @@ // // size_t hash_value(path const&) noexcept; + #include "filesystem_include.hpp" #include <type_traits> #include <vector> @@ -35,7 +36,7 @@ #include "test_iterators.h" #include "count_new.hpp" #include "filesystem_test_helper.hpp" - +#include "verbose_assert.h" struct PathCompareTest { const char* LHS; @@ -57,8 +58,9 @@ const PathCompareTest CompareTestCases[] = {"a/b/c", "b/a/c", -1}, {"a/b", "a/b/c", -1}, {"a/b/c", "a/b", 1}, - {"a/b/", "a/b/.", 0}, - {"a/b//////", "a/b/////.", 0}, + {"a/b/", "a/b/.", -1}, + {"a/b/", "a/b", 1}, + {"a/b//////", "a/b/////.", -1}, {"a/.././b", "a///..//.////b", 0}, {"//foo//bar///baz////", "//foo/bar/baz/", 0}, // duplicate separators {"///foo/bar", "/foo/bar", 0}, // "///" is not a root directory @@ -94,8 +96,13 @@ int main() int ret2 = normalize_ret(p1.compare(R)); int ret3 = normalize_ret(p1.compare(TC.RHS)); int ret4 = normalize_ret(p1.compare(RV)); - assert(ret1 == ret2 && ret1 == ret3 && ret1 == ret4); - assert(ret1 == E); + + g.release(); + ASSERT_EQ(ret1, ret2); + ASSERT_EQ(ret1, ret3); + ASSERT_EQ(ret1, ret4); + ASSERT_EQ(ret1, E) + << DISPLAY(TC.LHS) << DISPLAY(TC.RHS); // check signatures ASSERT_NOEXCEPT(p1.compare(p2)); |