mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
Add filesystem_error test back
This commit is contained in:
@ -208,4 +208,15 @@ TEST(std_test, exception) {
|
|||||||
} catch (const std::system_error& ex) {
|
} catch (const std::system_error& ex) {
|
||||||
EXPECT_THAT(fmt::format("{:t}", ex), StartsWith("std::system_error: "));
|
EXPECT_THAT(fmt::format("{:t}", ex), StartsWith("std::system_error: "));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cpp_lib_filesystem
|
||||||
|
// Tests that the inline namespace is stripped out, e.g.
|
||||||
|
// std::filesystem::__cxx11::* -> std::filesystem::*.
|
||||||
|
try {
|
||||||
|
throw std::filesystem::filesystem_error("message", std::error_code());
|
||||||
|
} catch (const std::filesystem::filesystem_error& ex) {
|
||||||
|
EXPECT_THAT(fmt::format("{:t}", ex),
|
||||||
|
StartsWith("std::filesystem::filesystem_error: "));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user