projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
add test for numeric -> string conversions
[folly.git]
/
folly
/
test
/
DynamicTest.cpp
diff --git
a/folly/test/DynamicTest.cpp
b/folly/test/DynamicTest.cpp
index 163c6d35739df36021990206e97bba346ad32146..8cfe0b551fd9bf12c6059c9f16efd83cd783fe4e 100644
(file)
--- a/
folly/test/DynamicTest.cpp
+++ b/
folly/test/DynamicTest.cpp
@@
-216,6
+216,10
@@
TEST(Dynamic, Conversions) {
EXPECT_EQ(str.asInt(), 0);
EXPECT_EQ(str.asDouble(), 0);
EXPECT_EQ(str.asString(), "0");
+
+ dynamic num = 12;
+ EXPECT_EQ("12", num.asString());
+ EXPECT_EQ(12.0, num.asDouble());
}
TEST(Dynamic, FormattedIO) {