forked from bblanchon/ArduinoJson
JsonDeserializerTests pass
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "Allocators.hpp"
|
#include "Allocators.hpp"
|
||||||
|
|
||||||
using ArduinoJson::detail::sizeofArray;
|
using namespace ArduinoJson::detail;
|
||||||
|
|
||||||
TEST_CASE("deserialize JSON array") {
|
TEST_CASE("deserialize JSON array") {
|
||||||
SpyingAllocator spy;
|
SpyingAllocator spy;
|
||||||
@ -92,8 +92,12 @@ TEST_CASE("deserialize JSON array") {
|
|||||||
REQUIRE(arr[0].as<double>() == Approx(4.2123456));
|
REQUIRE(arr[0].as<double>() == Approx(4.2123456));
|
||||||
REQUIRE(arr[1] == -7E89);
|
REQUIRE(arr[1] == -7E89);
|
||||||
REQUIRE(spy.log() == AllocatorLog{
|
REQUIRE(spy.log() == AllocatorLog{
|
||||||
Allocate(sizeofPool()),
|
Allocate(sizeofPool<VariantData>()),
|
||||||
Reallocate(sizeofPool(), sizeofPool(4)),
|
Allocate(sizeofPool<EightByteValue>()),
|
||||||
|
Reallocate(sizeofPool<VariantData>(),
|
||||||
|
sizeofPool<VariantData>(2)),
|
||||||
|
Reallocate(sizeofPool<EightByteValue>(),
|
||||||
|
sizeofPool<EightByteValue>(2)),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user