forked from bblanchon/ArduinoJson
Test size() after calling CreateObject
This commit is contained in:
@ -11,4 +11,15 @@ TEST(StaticJsonBuffer, InitialSizeIsZero)
|
||||
{
|
||||
StaticJsonBuffer<42> json;
|
||||
EXPECT_EQ(0, json.size());
|
||||
}
|
||||
|
||||
TEST(StaticJsonBuffer, WhenCreateObjectIsCalled_ThenSizeIsIncreasedByOne)
|
||||
{
|
||||
StaticJsonBuffer<42> json;
|
||||
|
||||
json.createObject();
|
||||
EXPECT_EQ(1, json.size());
|
||||
|
||||
json.createObject();
|
||||
EXPECT_EQ(2, json.size());
|
||||
}
|
Reference in New Issue
Block a user