From 05f0aa8ae13dcc2387f465bd10e43d7f590baf23 Mon Sep 17 00:00:00 2001 From: Steffen Schuemann Date: Sun, 7 Feb 2021 09:59:06 +0100 Subject: [PATCH] refs #89, fixing some test code issues --- test/filesystem_test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/filesystem_test.cpp b/test/filesystem_test.cpp index 23e6c01..2b1a403 100644 --- a/test/filesystem_test.cpp +++ b/test/filesystem_test.cpp @@ -127,6 +127,14 @@ struct StringMaker static std::string convert(fs::perms const& value) { return std::to_string(static_cast(value)); } }; +template <> +struct StringMaker +{ + static std::string convert(fs::file_status const& value) { + return std::string("[") + std::to_string(static_cast(value.type())) + "," + std::to_string(static_cast(value.permissions())) + "]"; + } +}; + #ifdef __cpp_lib_char8_t template <> struct StringMaker @@ -1219,6 +1227,7 @@ TEST_CASE("30.10.11 class file_status", "[filesystem][file_status][fs.class.file CHECK(fs.type() == fs::file_type::regular); CHECK(fs.permissions() == fs::perms::unknown); } +#if !defined(USE_STD_FS) || defined(GHC_FILESYSTEM_RUNNING_CPP20) { fs::file_status fs1{fs::file_type::regular, fs::perms::owner_read | fs::perms::owner_write | fs::perms::owner_exec}; fs::file_status fs2{fs::file_type::regular, fs::perms::owner_read | fs::perms::owner_write | fs::perms::owner_exec}; @@ -1228,6 +1237,7 @@ TEST_CASE("30.10.11 class file_status", "[filesystem][file_status][fs.class.file CHECK_FALSE(fs1 == fs3); CHECK_FALSE(fs1 == fs4); } +#endif } TEST_CASE("30.10.12 class directory_entry", "[filesystem][directory_entry][fs.dir.entry]")