Make FP formatting compatible with exotic chars

This commit is contained in:
Victor Zverovich
2025-08-24 08:49:54 -07:00
parent b7b261977e
commit e7e71009c7
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -74,6 +74,7 @@ TEST(xchar_test, format_explicitly_convertible_to_wstring_view) {
TEST(xchar_test, format) {
EXPECT_EQ(fmt::format(L"{}", 42), L"42");
EXPECT_EQ(fmt::format(L"{}", 4.2), L"4.2");
EXPECT_EQ(fmt::format(L"{}", 1e100), L"1e+100");
EXPECT_EQ(fmt::format(L"{}", L"abc"), L"abc");
EXPECT_EQ(fmt::format(L"{}", L'z'), L"z");
EXPECT_THROW(fmt::format(fmt::runtime(L"{:*\x343E}"), 42), fmt::format_error);