Store offset between slots to reduce memory usage

This commit is contained in:
Benoit Blanchon committed 2018-11-30 14:28:00 +01:00
1 parent 8ff48dde73
commit 04e8acd844
12 files changed
+118 -49

No files matched your search

+1
View File
@@ -8,6 +8,7 @@ add_executable(JsonArrayTests
copyTo.cpp
createNested.cpp
equals.cpp
get.cpp
isNull.cpp
iterator.cpp
remove.cpp
+16
View File
@@ -0,0 +1,16 @@
// ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2018
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
TEST_CASE("JsonArray::get()") {
DynamicJsonDocument doc;
deserializeJson(doc, "[1,2,3]");
JsonArray array = doc.as<JsonArray>();
SECTION("Overflow") {
REQUIRE(array.get(3).isNull());
}
}