Fix fallback float formatter at assymetric bounds (#1976)

This commit is contained in:
Victor Zverovich
2020-11-03 21:18:04 -08:00
parent 5f7f7b954d
commit ce98e0c6a0
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -1270,6 +1270,8 @@ TEST(FormatterTest, FormatDouble) {
EXPECT_EQ(buffer, format("{:a}", -42.0));
safe_sprintf(buffer, "%A", -42.0);
EXPECT_EQ(buffer, format("{:A}", -42.0));
EXPECT_EQ("9223372036854775808.000000",
format("{:f}", 9223372036854775807.0));
}
TEST(FormatterTest, PrecisionRounding) {