mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Add JsonVariant::link() (resolves #1343)
This commit is contained in:
@@ -28,4 +28,12 @@ TEST_CASE("JsonVariant::nesting()") {
|
||||
var.to<JsonArray>();
|
||||
REQUIRE(var.nesting() == 1);
|
||||
}
|
||||
|
||||
SECTION("returns depth of linked array") {
|
||||
StaticJsonDocument<128> doc2;
|
||||
doc2[0][0] = 42;
|
||||
var.link(doc2);
|
||||
|
||||
CHECK(var.nesting() == 2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user