[libcxx-commits] [PATCH] D98215: [libcxx] [test] Adjust separator form in fs.op.absolute for libc++ on windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 9 06:59:25 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe23317c9dae9: [libcxx] [test] Adjust separator form in fs.op.absolute for libc++ on windows (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98215/new/
https://reviews.llvm.org/D98215
Files:
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
libcxx/test/support/filesystem_test_helper.h
Index: libcxx/test/support/filesystem_test_helper.h
===================================================================
--- libcxx/test/support/filesystem_test_helper.h
+++ libcxx/test/support/filesystem_test_helper.h
@@ -591,6 +591,12 @@
return LHS.native() == RHS.native();
}
+inline bool PathEqIgnoreSep(fs::path LHS, fs::path RHS) {
+ LHS.make_preferred();
+ RHS.make_preferred();
+ return LHS.native() == RHS.native();
+}
+
struct ExceptionChecker {
std::errc expected_err;
fs::path expected_path1;
Index: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
+++ libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
@@ -42,15 +42,16 @@
} TestCases [] = {
{"", cwd / ""},
{"foo", cwd / "foo"},
- {"foo/", cwd / "foo" / ""},
- {"/already_absolute", cwd.root_path() / "already_absolute"}
+ {"foo/", cwd / "foo/"},
+ {"/already_absolute", cwd.root_name() / "/already_absolute"}
};
for (auto& TC : TestCases) {
std::error_code ec = GetTestEC();
const path ret = absolute(TC.input, ec);
TEST_CHECK(!ec);
TEST_CHECK(ret.is_absolute());
- TEST_CHECK(PathEq(ret, TC.expect));
+ TEST_CHECK(PathEqIgnoreSep(ret, TC.expect));
+ LIBCPP_ONLY(TEST_CHECK(PathEq(ret, TC.expect)));
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98215.329323.patch
Type: text/x-patch
Size: 1540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210309/f8559821/attachment.bin>
More information about the libcxx-commits
mailing list