// ArduinoJson - https://arduinojson.org // Copyright © 2014-2023, Benoit BLANCHON // MIT License #include #include TEST_CASE("JsonArray basics") { DynamicJsonDocument doc(4096); JsonArray array = doc.to(); SECTION("CreateNestedArray") { JsonArray arr = array.createNestedArray(); REQUIRE(arr == array[0].as()); } SECTION("CreateNestedObject") { JsonObject obj = array.createNestedObject(); REQUIRE(obj == array[0].as()); } }