forked from bblanchon/ArduinoJson
Return JsonArray and JsonObject by value (closes #309)
This commit is contained in:
1 parent
4fe2b1100e
commit
b105e6f7c4
93 files changed
+983
-1091
No files matched your search
@@ -68,7 +68,7 @@ TEST_CASE("deserialize JSON array with a StaticJsonDocument") {
|
||||
deserializeJson(doc, input);
|
||||
deserializeJson(doc, "[]");
|
||||
|
||||
JsonArray& arr = doc.as<JsonArray>();
|
||||
JsonArray arr = doc.as<JsonArray>();
|
||||
REQUIRE(arr.size() == 0);
|
||||
REQUIRE(doc.memoryUsage() == JSON_ARRAY_SIZE(0));
|
||||
}
|
||||
@@ -78,7 +78,7 @@ TEST_CASE("deserialize JSON array with a StaticJsonDocument") {
|
||||
char input[] = "[1,2]";
|
||||
|
||||
DeserializationError err = deserializeJson(doc, input);
|
||||
JsonArray& arr = doc.as<JsonArray>();
|
||||
JsonArray arr = doc.as<JsonArray>();
|
||||
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
REQUIRE(doc.is<JsonArray>());
|
||||
|
||||
Reference in new issue
Block a user