Test empty object serialization

This commit is contained in:
Benoit Blanchon
2014-09-30 16:31:22 +02:00
parent d3cf568d07
commit ab2587f089
6 changed files with 53 additions and 0 deletions

View File

@ -93,4 +93,16 @@ TEST_F(JsonValueTests, CharPointersAreCopied)
jsonValue1 = "world";
EXPECT_STREQ("hello", (const char*) jsonValue2);
}
TEST_F(JsonValueTests, ObjectPointsAreCopied)
{
JsonObject object = json.createObject();
jsonValue1 = object;
jsonValue2 = jsonValue1;
object["hello"] = "world";
EXPECT_EQ(1, ((JsonObject) jsonValue2).size());
}