forked from bblanchon/ArduinoJson
Make VariantSlot a union. Include next slot id in VariantData
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// MIT License
|
||||
|
||||
#include <ArduinoJson/Memory/ResourceManager.hpp>
|
||||
#include <ArduinoJson/Memory/ResourceManagerImpl.hpp>
|
||||
#include <ArduinoJson/Memory/VariantPoolImpl.hpp>
|
||||
#include <catch.hpp>
|
||||
|
||||
@@ -21,10 +22,10 @@ TEST_CASE("ResourceManager::size()") {
|
||||
SECTION("Doesn't grow when allocation of second pool fails") {
|
||||
timebomb.setCountdown(1);
|
||||
for (size_t i = 0; i < ARDUINOJSON_POOL_CAPACITY; i++)
|
||||
resources.allocSlot();
|
||||
resources.allocVariant();
|
||||
size_t size = resources.size();
|
||||
|
||||
resources.allocSlot();
|
||||
resources.allocVariant();
|
||||
|
||||
REQUIRE(size == resources.size());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user