mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-30 10:47:34 +02:00
Fix JsonVariantTests
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
#include "Allocators.hpp"
|
#include "Allocators.hpp"
|
||||||
#include "Literals.hpp"
|
#include "Literals.hpp"
|
||||||
|
|
||||||
using ArduinoJson::detail::sizeofObject;
|
using namespace ArduinoJson::detail;
|
||||||
|
|
||||||
enum ErrorCode { ERROR_01 = 1, ERROR_10 = 10 };
|
enum ErrorCode { ERROR_01 = 1, ERROR_10 = 10 };
|
||||||
|
|
||||||
@ -199,8 +199,8 @@ TEST_CASE("JsonVariant::set() when there is enough memory") {
|
|||||||
REQUIRE(variant.as<double>() == 1.2);
|
REQUIRE(variant.as<double>() == 1.2);
|
||||||
REQUIRE(spy.log() ==
|
REQUIRE(spy.log() ==
|
||||||
AllocatorLog{
|
AllocatorLog{
|
||||||
Allocate(sizeofPool()),
|
Allocate(sizeofPool<EightByteValue>()),
|
||||||
Reallocate(sizeofPool(), sizeofPool(1)), // one extension slot
|
Reallocate(sizeofPool<EightByteValue>(), sizeofPool<EightByteValue>(1)),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,8 +222,8 @@ TEST_CASE("JsonVariant::set() when there is enough memory") {
|
|||||||
REQUIRE(variant.as<int64_t>() == -2147483649LL);
|
REQUIRE(variant.as<int64_t>() == -2147483649LL);
|
||||||
REQUIRE(spy.log() ==
|
REQUIRE(spy.log() ==
|
||||||
AllocatorLog{
|
AllocatorLog{
|
||||||
Allocate(sizeofPool()),
|
Allocate(sizeofPool<EightByteValue>()),
|
||||||
Reallocate(sizeofPool(), sizeofPool(1)), // one extension slot
|
Reallocate(sizeofPool<EightByteValue>(), sizeofPool<EightByteValue>(1)),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,8 +245,8 @@ TEST_CASE("JsonVariant::set() when there is enough memory") {
|
|||||||
REQUIRE(variant.as<uint64_t>() == 4294967296);
|
REQUIRE(variant.as<uint64_t>() == 4294967296);
|
||||||
REQUIRE(spy.log() ==
|
REQUIRE(spy.log() ==
|
||||||
AllocatorLog{
|
AllocatorLog{
|
||||||
Allocate(sizeofPool()),
|
Allocate(sizeofPool<EightByteValue>()),
|
||||||
Reallocate(sizeofPool(), sizeofPool(1)), // one extension slot
|
Reallocate(sizeofPool<EightByteValue>(), sizeofPool<EightByteValue>(1)),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user