forked from bblanchon/ArduinoJson
Test that size doesn't change when remove() is called with an invalid key
This commit is contained in:
@ -44,6 +44,16 @@ TEST_F(JsonObjectTests, Shrink_WhenValuesAreRemoved)
|
||||
EXPECT_EQ(0, object.size());
|
||||
}
|
||||
|
||||
TEST_F(JsonObjectTests, DoNotShrink_WhenRemoveIsCalledWithAWrongKey)
|
||||
{
|
||||
object["hello"];
|
||||
object["world"];
|
||||
|
||||
object.remove(":-P");
|
||||
|
||||
EXPECT_EQ(2, object.size());
|
||||
}
|
||||
|
||||
TEST_F(JsonObjectTests, CanStoreIntegers)
|
||||
{
|
||||
object["hello"] = 123;
|
||||
|
Reference in New Issue
Block a user