Use textual formatting for bool with %s specifier in printf (#224)
This commit is contained in:
1 parent
7dcf05108e
commit
2157375d5c
2 files changed
+30
-12
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user