Implement debug format for error_code

This commit is contained in:
Victor Zverovich
2025-04-27 09:06:17 -07:00
parent a7d7b894cd
commit c936e2e44e
2 changed files with 16 additions and 6 deletions

View File

@ -286,6 +286,8 @@ TEST(std_test, error_code) {
"system:-42");
auto ec = std::make_error_code(std::errc::value_too_large);
EXPECT_EQ(fmt::format("{:s}", ec), ec.message());
EXPECT_EQ(fmt::format("{:?}", std::error_code(42, generic)),
"\"generic:42\"");
}
template <typename Catch> void exception_test() {