mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Added JsonArrayConst, JsonObjectConst, and JsonVariantConst
This commit is contained in:
@@ -56,4 +56,13 @@ TEST_CASE("JsonObject::copyFrom()") {
|
||||
REQUIRE(doc1.memoryUsage() == doc2.memoryUsage());
|
||||
REQUIRE(obj2["hello"] == std::string("world"));
|
||||
}
|
||||
|
||||
SECTION("should work with JsonObjectConst") {
|
||||
obj1["hello"] = "world";
|
||||
|
||||
obj2.copyFrom(static_cast<JsonObjectConst>(obj1));
|
||||
|
||||
REQUIRE(doc1.memoryUsage() == doc2.memoryUsage());
|
||||
REQUIRE(obj2["hello"] == std::string("world"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user