Skip to content

Commit 3f6fff7

Browse files
committed
Fix JsonVariantTests
1 parent cc2fea4 commit 3f6fff7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

extras/tests/JsonVariant/set.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "Allocators.hpp"
99
#include "Literals.hpp"
1010

11-
using ArduinoJson::detail::sizeofObject;
11+
using namespace ArduinoJson::detail;
1212

1313
enum ErrorCode { ERROR_01 = 1, ERROR_10 = 10 };
1414

@@ -199,8 +199,8 @@ TEST_CASE("JsonVariant::set() when there is enough memory") {
199199
REQUIRE(variant.as<double>() == 1.2);
200200
REQUIRE(spy.log() ==
201201
AllocatorLog{
202-
Allocate(sizeofPool()),
203-
Reallocate(sizeofPool(), sizeofPool(1)), // one extension slot
202+
Allocate(sizeofPool<EightByteValue>()),
203+
Reallocate(sizeofPool<EightByteValue>(), sizeofPool<EightByteValue>(1)),
204204
});
205205
}
206206

@@ -222,8 +222,8 @@ TEST_CASE("JsonVariant::set() when there is enough memory") {
222222
REQUIRE(variant.as<int64_t>() == -2147483649LL);
223223
REQUIRE(spy.log() ==
224224
AllocatorLog{
225-
Allocate(sizeofPool()),
226-
Reallocate(sizeofPool(), sizeofPool(1)), // one extension slot
225+
Allocate(sizeofPool<EightByteValue>()),
226+
Reallocate(sizeofPool<EightByteValue>(), sizeofPool<EightByteValue>(1)),
227227
});
228228
}
229229

@@ -245,8 +245,8 @@ TEST_CASE("JsonVariant::set() when there is enough memory") {
245245
REQUIRE(variant.as<uint64_t>() == 4294967296);
246246
REQUIRE(spy.log() ==
247247
AllocatorLog{
248-
Allocate(sizeofPool()),
249-
Reallocate(sizeofPool(), sizeofPool(1)), // one extension slot
248+
Allocate(sizeofPool<EightByteValue>()),
249+
Reallocate(sizeofPool<EightByteValue>(), sizeofPool<EightByteValue>(1)),
250250
});
251251
}
252252

0 commit comments

Comments
 (0)