Remove capacity from JsonDocument's constructor

This commit is contained in:
Benoit Blanchon
2023-07-17 18:15:13 +02:00
parent 42b2840009
commit 0f319e7ca4
162 changed files with 438 additions and 500 deletions

View File

@ -8,11 +8,10 @@
#include "Allocators.hpp"
using ArduinoJson::detail::sizeofArray;
using ArduinoJson::detail::sizeofObject;
using ArduinoJson::detail::sizeofString;
TEST_CASE("deserialize JSON array") {
JsonDocument doc(4096);
JsonDocument doc;
SECTION("An empty array") {
DeserializationError err = deserializeJson(doc, "[]");
@ -260,7 +259,7 @@ TEST_CASE("deserialize JSON array") {
TEST_CASE("deserialize JSON array under memory constraints") {
TimebombAllocator allocator(100);
JsonDocument doc(0, &allocator);
JsonDocument doc(&allocator);
SECTION("empty array requires no allocation") {
allocator.setCountdown(0);