From: Tom Jackson Date: Thu, 24 Jul 2014 17:37:15 +0000 (-0700) Subject: Adding one more test for trailing dots X-Git-Tag: v0.22.0~432 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b942767a0f464533e65ea38c639bf5f535b8f1e0;p=folly.git Adding one more test for trailing dots Summary: Sorry, forgot to include tests for the other side of the equation. Test Plan: It is a test Reviewed By: tudorb@fb.com FB internal diff: D1455583 --- diff --git a/folly/test/FormatTest.cpp b/folly/test/FormatTest.cpp index 44873273..a72be0a0 100644 --- a/folly/test/FormatTest.cpp +++ b/folly/test/FormatTest.cpp @@ -240,6 +240,7 @@ TEST(Format, Float) { EXPECT_EQ("0.01", sformat("{:.2f}", 0.01)); EXPECT_EQ("0.00", sformat("{:.2f}", 0.001)); + EXPECT_EQ("100000. !== 100000", sformat("{:.} !== {:.}", 100000.0, 100000)); EXPECT_EQ("100000.", sformat("{:.}", 100000.0)); EXPECT_EQ("1e+6", sformat("{:.}", 1000000.0)); EXPECT_EQ(" 100000.", sformat("{:8.}", 100000.0));