Make VariantSlot a union. Include next slot id in VariantData

This commit is contained in:
Benoit Blanchon
2024-08-24 19:20:39 +02:00
parent ab72bb8601
commit d3721cb122
19 changed files with 170 additions and 150 deletions
+2 -1
View File
@@ -3,6 +3,7 @@
// MIT License
#include <ArduinoJson/Memory/ResourceManager.hpp>
#include <ArduinoJson/Memory/ResourceManagerImpl.hpp>
#include <ArduinoJson/Memory/VariantPoolImpl.hpp>
#include <ArduinoJson/Strings/StringAdapters.hpp>
#include <catch.hpp>
@@ -13,7 +14,7 @@ TEST_CASE("ResourceManager::clear()") {
ResourceManager resources;
SECTION("Discards allocated variants") {
resources.allocSlot();
resources.allocVariant();
resources.clear();
REQUIRE(resources.size() == 0);