projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91499a6
)
Unit test showing array assignment problem on gcc 4.9
author
Barney Moss
<barneym@fb.com>
Thu, 10 Dec 2015 10:37:18 +0000
(
02:37
-0800)
committer
facebook-github-bot-0
<folly-bot@fb.com>
Thu, 10 Dec 2015 11:20:20 +0000
(
03:20
-0800)
Summary: Unit test showing array assignment problem on gcc 4.9
Reviewed By: lbrandy
Differential Revision:
D2739900
fb-gh-sync-id:
6b0fde956672b8248fbd4e620fd112195c45c646
folly/test/DynamicTest.cpp
patch
|
blob
|
history
diff --git
a/folly/test/DynamicTest.cpp
b/folly/test/DynamicTest.cpp
index f9360f0212bc2b571286ecb5323268963302fd7c..83e21cf6a4f810961f2598026359e46640d0aa05 100644
(file)
--- a/
folly/test/DynamicTest.cpp
+++ b/
folly/test/DynamicTest.cpp
@@
-229,6
+229,16
@@
TEST(Dynamic, DeepCopy) {
EXPECT_EQ(obj2.at("a"), expected);
}
+TEST(Dynamic, ArrayReassignment) {
+ dynamic o = 1;
+
+ dynamic d1 = {o};
+ EXPECT_EQ(dynamic::ARRAY, d1.type());
+
+ d1 = {o};
+ EXPECT_EQ(dynamic::ARRAY, d1.type());
+}
+
TEST(Dynamic, Operator) {
bool caught = false;
try {