Add a pool dedicated to 8-byte values (double/int64_t/uint64_t)

This new pool replaced the "extension" slot where a secondary variant slot was used to store 8-byte values.
This commit is contained in:
Benoit Blanchon
2025-08-30 09:55:32 +02:00
parent dddc4912c4
commit db2eec46c7
18 changed files with 129 additions and 115 deletions

View File

@@ -8,7 +8,7 @@
#include "Allocators.hpp"
#include "Literals.hpp"
using ArduinoJson::detail::sizeofArray;
using namespace ArduinoJson::detail;
TEST_CASE("JsonArray::add(T)") {
SpyingAllocator spy;
@@ -33,7 +33,8 @@ TEST_CASE("JsonArray::add(T)") {
REQUIRE(array[0].is<double>());
REQUIRE_FALSE(array[0].is<bool>());
REQUIRE(spy.log() == AllocatorLog{
Allocate(sizeofPool()),
Allocate(sizeofPool<VariantData>()),
Allocate(sizeofPool<EightByteValue>()),
});
}