Browse Source

[2302] Add a set test for map Element

Mukund Sivaraman 12 years ago
parent
commit
55178c917f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/lib/cc/tests/data_unittests.cc

+ 2 - 0
src/lib/cc/tests/data_unittests.cc

@@ -451,6 +451,8 @@ TEST(Element, create_and_value_throws) {
     testGetValueMap<ConstElementPtr>();
 
     el = Element::createMap();
+    EXPECT_NO_THROW(el->set("foo", Element::create("bar")));
+    EXPECT_EQ("{ \"foo\": \"bar\" }", el->str());
 }
 
 // Helper for escape check; it puts the given string in a StringElement,