mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-30 02:37:35 +02:00
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());
|
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)
|
TEST_F(JsonObjectTests, CanStoreIntegers)
|
||||||
{
|
{
|
||||||
object["hello"] = 123;
|
object["hello"] = 123;
|
||||||
|
Reference in New Issue
Block a user