Update to ArduinoJson 7.0.4
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// ArduinoJson - https://arduinojson.org
|
||||
// Copyright © 2014-2023, Benoit BLANCHON
|
||||
// Copyright © 2014-2024, Benoit BLANCHON
|
||||
// MIT License
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
@@ -15,7 +15,7 @@ static void checkArray(JsonArray array, std::string expected) {
|
||||
}
|
||||
|
||||
TEST_CASE("serializeJsonPretty(JsonArray)") {
|
||||
DynamicJsonDocument doc(4096);
|
||||
JsonDocument doc;
|
||||
JsonArray array = doc.to<JsonArray>();
|
||||
|
||||
SECTION("Empty") {
|
||||
@@ -43,8 +43,8 @@ TEST_CASE("serializeJsonPretty(JsonArray)") {
|
||||
}
|
||||
|
||||
SECTION("EmptyNestedArrays") {
|
||||
array.createNestedArray();
|
||||
array.createNestedArray();
|
||||
array.add<JsonArray>();
|
||||
array.add<JsonArray>();
|
||||
|
||||
checkArray(array,
|
||||
"[\r\n"
|
||||
@@ -54,11 +54,11 @@ TEST_CASE("serializeJsonPretty(JsonArray)") {
|
||||
}
|
||||
|
||||
SECTION("NestedArrays") {
|
||||
JsonArray nested1 = array.createNestedArray();
|
||||
JsonArray nested1 = array.add<JsonArray>();
|
||||
nested1.add(1);
|
||||
nested1.add(2);
|
||||
|
||||
JsonObject nested2 = array.createNestedObject();
|
||||
JsonObject nested2 = array.add<JsonObject>();
|
||||
nested2["key"] = 3;
|
||||
|
||||
checkArray(array,
|
||||
|
||||
Reference in New Issue
Block a user