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-06-02 19:39:08 +02:00
parent 8e3286aac8
commit 7e093ffc25
17 changed files with 127 additions and 113 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>()),
});
}