projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56df65b
)
Adding one more test for trailing dots
author
Tom Jackson
<tjackson@fb.com>
Thu, 24 Jul 2014 17:37:15 +0000
(10:37 -0700)
committer
Chip Turner
<chip@fb.com>
Fri, 25 Jul 2014 16:07:15 +0000
(09:07 -0700)
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
folly/test/FormatTest.cpp
patch
|
blob
|
history
diff --git
a/folly/test/FormatTest.cpp
b/folly/test/FormatTest.cpp
index 448732730243661d78971e6f815c34e8baec0298..a72be0a0676bc3225aa5245804e87acf7f4ce726 100644
(file)
--- 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));