Test that CreateObject() returns an empty JsonObject

This commit is contained in:
Benoit Blanchon
2014-09-27 11:42:27 +02:00
parent 890e811e80
commit 91649df593
5 changed files with 58 additions and 2 deletions

View File

@ -33,4 +33,12 @@ TEST(StaticJsonBuffer, GivenBufferIsFull_WhenCreateObjectIsCalled_ThenSizeDoesNo
json.createObject();
EXPECT_EQ(1, json.size());
}
TEST(StaticJsonBuffer, WhenWhenCreateObjectIsCalled_ThenAnEmptyJsonObjectIsReturned)
{
StaticJsonBuffer<42> json;
JsonObject obj = json.createObject();
EXPECT_EQ(0, obj.size());
}