forked from bblanchon/ArduinoJson
Preallocate pool list
This commit is contained in:
@ -39,10 +39,7 @@ TEST_CASE("JsonArray::clear()") {
|
||||
for (int i = 0; i < ARDUINOJSON_POOL_CAPACITY; i++)
|
||||
array.add(i);
|
||||
|
||||
REQUIRE(
|
||||
allocator.log() ==
|
||||
AllocatorLog() << AllocatorLog::Allocate(sizeofPoolList())
|
||||
<< AllocatorLog::Allocate(sizeofPool()) // only one pool
|
||||
);
|
||||
REQUIRE(allocator.log() == AllocatorLog()
|
||||
<< AllocatorLog::Allocate(sizeofPool()));
|
||||
}
|
||||
}
|
||||
|
@ -105,9 +105,7 @@ TEST_CASE("Removed elements are recycled") {
|
||||
// add one element; it should use the free slot
|
||||
array.add(42);
|
||||
|
||||
REQUIRE(
|
||||
allocator.log() ==
|
||||
AllocatorLog() << AllocatorLog::Allocate(sizeofPoolList())
|
||||
<< AllocatorLog::Allocate(sizeofPool()) // only one pool
|
||||
REQUIRE(allocator.log() == AllocatorLog() << AllocatorLog::Allocate(
|
||||
sizeofPool()) // only one pool
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user