forked from bblanchon/ArduinoJson
Store offset between slots to reduce memory usage
This commit is contained in:
16
test/JsonArray/get.cpp
Normal file
16
test/JsonArray/get.cpp
Normal 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());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user