forked from bblanchon/ArduinoJson
Added StaticJsonDocument and DynamicJsonDocument.
Removed StaticJsonArray and DynamicJsonArray. Removed StaticJsonObject and DynamicJsonObject. Removed StaticJsonVariant and DynamicJsonVariant.
This commit is contained in:
@ -38,11 +38,12 @@ TEST_CASE("JsonVariant copy") {
|
||||
_variant2 = _variant1;
|
||||
_variant1 = "world";
|
||||
|
||||
REQUIRE(std::string("hello") == _variant2.as<const char *>());
|
||||
REQUIRE(std::string("hello") == _variant2.as<const char*>());
|
||||
}
|
||||
|
||||
SECTION("ObjectsAreCopiedByReference") {
|
||||
DynamicJsonObject object;
|
||||
DynamicJsonDocument doc;
|
||||
JsonObject& object = doc.to<JsonObject>();
|
||||
|
||||
_variant1 = object;
|
||||
|
||||
@ -52,7 +53,8 @@ TEST_CASE("JsonVariant copy") {
|
||||
}
|
||||
|
||||
SECTION("ArraysAreCopiedByReference") {
|
||||
DynamicJsonArray array;
|
||||
DynamicJsonDocument doc;
|
||||
JsonArray& array = doc.to<JsonArray>();
|
||||
|
||||
_variant1 = array;
|
||||
|
||||
|
Reference in New Issue
Block a user