Use textual formatting for bool with %s specifier in printf (#224)

This commit is contained in:
vitaut committed 2015-11-13 07:18:44 -08:00
1 parent 7dcf05108e
commit 2157375d5c
2 files changed
+30 -12

No files matched your search

+5
View File
@@ -373,6 +373,11 @@ TEST(PrintfTest, Length) {
EXPECT_PRINTF(fmt::format("{}", max), "%Lg", max);
}
TEST(PrintfTest, Bool) {
EXPECT_PRINTF("1", "%d", true);
EXPECT_PRINTF("true", "%s", true);
}
TEST(PrintfTest, Int) {
EXPECT_PRINTF("-42", "%d", -42);
EXPECT_PRINTF("-42", "%i", -42);