error on bool arg w/ char pres_type (#3734)

This commit is contained in:
js324
2023-12-05 16:45:10 -05:00
committed by GitHub
parent 5d55375a8a
commit 573d74395b
2 changed files with 3 additions and 0 deletions

View File

@@ -1159,6 +1159,8 @@ TEST(format_test, format_bool) {
EXPECT_EQ("true", fmt::format("{:s}", true));
EXPECT_EQ("false", fmt::format("{:s}", false));
EXPECT_EQ("false ", fmt::format("{:6s}", false));
EXPECT_THROW_MSG((void)fmt::format(runtime("{:c}"), false), format_error,
"invalid format specifier");
}
TEST(format_test, format_short) {