forked from bblanchon/ArduinoJson
Test size() after calling CreateObject
This commit is contained in:
1 parent
6e45f7c790
commit
bb887f94e7
3 files changed
+17
No files matched your search
@@ -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