Commit 13d472bd authored by Victor Zverovich's avatar Victor Zverovich

Compute output size for grisu

parent b71d3fe7
This diff is collapsed.
...@@ -1415,6 +1415,10 @@ TEST(FormatterTest, FormatDouble) { ...@@ -1415,6 +1415,10 @@ TEST(FormatterTest, FormatDouble) {
EXPECT_EQ(buffer, format("{:A}", -42.0)); EXPECT_EQ(buffer, format("{:A}", -42.0));
} }
TEST(FormatterTest, FormatDoubleBigPrecision) {
EXPECT_EQ(format("0.{:0<1000}", ""), format("{:.1000f}", 0.0));
}
TEST(FormatterTest, FormatNaN) { TEST(FormatterTest, FormatNaN) {
double nan = std::numeric_limits<double>::quiet_NaN(); double nan = std::numeric_limits<double>::quiet_NaN();
EXPECT_EQ("nan", format("{}", nan)); EXPECT_EQ("nan", format("{}", nan));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment