[libcxx-commits] [libcxx] 701fa70 - [libcxx] [test] Use fs::path::string_type instead of std::string in fs.op.relative
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 16 07:37:46 PDT 2020
Author: Martin Storsjö
Date: 2020-10-16T17:36:56+03:00
New Revision: 701fa703fc7774bad01a70d6e4c721f634bbeceb
URL: https://github.com/llvm/llvm-project/commit/701fa703fc7774bad01a70d6e4c721f634bbeceb
DIFF: https://github.com/llvm/llvm-project/commit/701fa703fc7774bad01a70d6e4c721f634bbeceb.diff
LOG: [libcxx] [test] Use fs::path::string_type instead of std::string in fs.op.relative
Differential Revision: https://reviews.llvm.org/D89538
Added:
Modified:
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
index 9bfe9589b5e1..aba9023bf8b4 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
@@ -31,41 +31,41 @@ TEST_SUITE(filesystem_proximate_path_test_suite)
TEST_CASE(test_signature_0) {
fs::path p("");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(fs::current_path()));
+ TEST_CHECK(output == fs::path::string_type(fs::current_path()));
}
TEST_CASE(test_signature_1) {
fs::path p(".");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(fs::current_path()));
+ TEST_CHECK(output == fs::path::string_type(fs::current_path()));
}
TEST_CASE(test_signature_2) {
static_test_env static_env;
fs::path p(static_env.File);
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.File));
+ TEST_CHECK(output == fs::path::string_type(static_env.File));
}
TEST_CASE(test_signature_3) {
static_test_env static_env;
fs::path p(static_env.Dir);
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir));
}
TEST_CASE(test_signature_4) {
static_test_env static_env;
fs::path p(static_env.SymlinkToDir);
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir));
}
TEST_CASE(test_signature_5) {
static_test_env static_env;
fs::path p(static_env.SymlinkToDir / "dir2/.");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir / "dir2"));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir / "dir2"));
}
TEST_CASE(test_signature_6) {
@@ -74,56 +74,56 @@ TEST_CASE(test_signature_6) {
// it is omitted. Otherwise it is added to the end of the result.
fs::path p(static_env.SymlinkToDir / "dir2/./");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir / "dir2"));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir / "dir2"));
}
TEST_CASE(test_signature_7) {
static_test_env static_env;
fs::path p(static_env.SymlinkToDir / "dir2/DNE/./");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir / "dir2/DNE/"));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir / "dir2/DNE/"));
}
TEST_CASE(test_signature_8) {
static_test_env static_env;
fs::path p(static_env.SymlinkToDir / "dir2");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir2));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir2));
}
TEST_CASE(test_signature_9) {
static_test_env static_env;
fs::path p(static_env.SymlinkToDir / "dir2/../dir2/DNE/..");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir2 / ""));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir2 / ""));
}
TEST_CASE(test_signature_10) {
static_test_env static_env;
fs::path p(static_env.SymlinkToDir / "dir2/dir3/../DNE/DNE2");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir2 / "DNE/DNE2"));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir2 / "DNE/DNE2"));
}
TEST_CASE(test_signature_11) {
static_test_env static_env;
fs::path p(static_env.Dir / "../dir1");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir));
}
TEST_CASE(test_signature_12) {
static_test_env static_env;
fs::path p(static_env.Dir / "./.");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir));
}
TEST_CASE(test_signature_13) {
static_test_env static_env;
fs::path p(static_env.Dir / "DNE/../foo");
const fs::path output = fs::weakly_canonical(p);
- TEST_CHECK(output == std::string(static_env.Dir / "foo"));
+ TEST_CHECK(output == fs::path::string_type(static_env.Dir / "foo"));
}
TEST_SUITE_END()
More information about the libcxx-commits
mailing list