forked from bblanchon/ArduinoJson
CollectionData: addSlot()
returns an iterator
This commit is contained in:
@ -400,7 +400,7 @@ TEST_CASE("MemberProxy under memory constraints") {
|
||||
|
||||
REQUIRE(doc.is<JsonObject>());
|
||||
REQUIRE(doc.size() == 0);
|
||||
REQUIRE(doc.memoryUsage() == sizeofObject(1));
|
||||
REQUIRE(doc.memoryUsage() == 0);
|
||||
REQUIRE(doc.overflowed() == true);
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,8 @@ TEST_CASE("JsonDocument::garbageCollect()") {
|
||||
REQUIRE(doc.memoryUsage() == sizeofObject(2) + sizeofString(7));
|
||||
REQUIRE(doc.as<std::string>() == "{\"dancing\":2}");
|
||||
|
||||
REQUIRE(spyingAllocator.log() == AllocatorLog()
|
||||
<< AllocatorLog::AllocateFail(4096));
|
||||
REQUIRE(spyingAllocator.log() ==
|
||||
AllocatorLog() << AllocatorLog::AllocateFail(4096)
|
||||
<< AllocatorLog::AllocateFail(sizeofString(7)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user