mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-15 19:42:12 +02:00
Added more tests of StaticJsonBuffer
This commit is contained in:
@ -39,3 +39,13 @@ TEST(StaticJsonBuffer_Object_Tests, FailsWhenTooSmall) {
|
||||
JsonObject &object = json.createObject();
|
||||
ASSERT_FALSE(object.success());
|
||||
}
|
||||
|
||||
TEST(StaticJsonBuffer_Object_Tests, ObjectDoesntGrowWhenFull) {
|
||||
StaticJsonBuffer<JSON_OBJECT_SIZE(1)> json;
|
||||
|
||||
JsonObject &obj = json.createObject();
|
||||
obj["hello"];
|
||||
obj["world"];
|
||||
|
||||
ASSERT_EQ(JSON_OBJECT_SIZE(1), json.size());
|
||||
}
|
||||
|
Reference in New Issue
Block a user