%.f should have zero precision, not default precision

This commit is contained in:
Arthur Danskin authored and Victor Zverovich committed 2017-04-08 07:18:10 -07:00
1 parent c03f55ec3a
commit cbac016cce
2 files changed
+5

No files matched your search

+3
View File
@@ -401,6 +401,9 @@ TEST(PrintfTest, LongLong) {
TEST(PrintfTest, Float) {
EXPECT_PRINTF("392.650000", "%f", 392.65);
EXPECT_PRINTF("392.65", "%.2f", 392.65);
EXPECT_PRINTF("392.6", "%.1f", 392.65);
EXPECT_PRINTF("393", "%.f", 392.65);
EXPECT_PRINTF("392.650000", "%F", 392.65);
EXPECT_PRINTF("392.65", "%s", 392.65);
char buffer[BUFFER_SIZE];