This commit is contained in:
Benoit Blanchon
2022-03-11 18:39:05 +01:00
parent cf56a7de2a
commit 6a23b014dc
2 changed files with 13 additions and 3 deletions

View File

@@ -28,4 +28,12 @@ TEST_CASE("JsonVariant::nesting()") {
var.to<JsonArray>();
REQUIRE(var.nesting() == 1);
}
SECTION("return depth of linked array") {
StaticJsonDocument<128> doc2;
doc2[0][0] = 42;
var.link(doc2);
CHECK(var.nesting() == 2);
}
}