Update to ArduinoJson 7.0.4

This commit is contained in:
iranl
2024-04-19 14:44:01 +02:00
parent 1378732081
commit 81be0a689a
444 changed files with 10842 additions and 9422 deletions

View File

@@ -1,7 +1,9 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2023, Benoit BLANCHON
// Copyright © 2014-2024, Benoit BLANCHON
// MIT License
#define ARDUINOJSON_SLOT_ID_SIZE 4 // required to reach 65536 elements
#include <ArduinoJson.h>
#include <catch.hpp>
@@ -26,7 +28,7 @@ static void check(const JsonArray array, const std::string& expected) {
}
TEST_CASE("serialize MsgPack array") {
DynamicJsonDocument doc(JSON_ARRAY_SIZE(65536));
JsonDocument doc;
JsonArray array = doc.to<JsonArray>();
SECTION("empty") {
@@ -53,6 +55,7 @@ TEST_CASE("serialize MsgPack array") {
const char* nil = 0;
for (int i = 0; i < 65536; i++)
array.add(nil);
REQUIRE(array.size() == 65536);
check(array,
std::string("\xDD\x00\x01\x00\x00", 5) + std::string(65536, '\xc0'));