forked from bblanchon/ArduinoJson
Test empty object serialization
This commit is contained in:
@ -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());
|
||||
}
|
Reference in New Issue
Block a user