Cleanup 'L' handling

This commit is contained in:
Victor Zverovich
2021-01-18 07:57:38 -08:00
parent b4b8917caf
commit 7fd535c6ae
2 changed files with 16 additions and 12 deletions
+3 -2
View File
@@ -1408,7 +1408,7 @@ TEST(FormatterTest, FormatLongDouble) {
}
TEST(FormatterTest, FormatChar) {
const char types[] = "cbBdoxXL";
const char types[] = "cbBdoxX";
check_unknown_types('a', types, "char");
EXPECT_EQ("a", format("{0}", 'a'));
EXPECT_EQ("z", format("{0:c}", 'z'));
@@ -1416,7 +1416,8 @@ TEST(FormatterTest, FormatChar) {
int n = 'x';
for (const char* type = types + 1; *type; ++type) {
std::string format_str = fmt::format("{{:{}}}", *type);
EXPECT_EQ(fmt::format(format_str, n), fmt::format(format_str, 'x'));
EXPECT_EQ(fmt::format(format_str, n), fmt::format(format_str, 'x'))
<< format_str;
}
EXPECT_EQ(fmt::format("{:02X}", n), fmt::format("{:02X}", 'x'));
}