Test size() after calling CreateObject

This commit is contained in:
Benoit Blanchon committed 2014-09-27 10:16:30 +02:00
1 parent 6e45f7c790
commit bb887f94e7
3 files changed
+17

No files matched your search

+11
View File
@@ -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());
}