forked from bblanchon/ArduinoJson
Added JsonArrayConst, JsonObjectConst, and JsonVariantConst
This commit is contained in:
1 parent
d1003ff6c9
commit
b0560cbd99
47 files changed
+1909
-1063
No files matched your search
@@ -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