2018-11-30 14:26:15 +01:00
|
|
|
// ArduinoJson - arduinojson.org
|
2020-01-09 15:48:38 +01:00
|
|
|
// Copyright Benoit Blanchon 2014-2020
|
2018-11-30 14:26:15 +01:00
|
|
|
// MIT License
|
|
|
|
|
|
|
|
#include <ArduinoJson.h>
|
|
|
|
#include <catch.hpp>
|
|
|
|
|
|
|
|
TEST_CASE("JsonArray::get()") {
|
2019-01-14 10:32:19 +01:00
|
|
|
DynamicJsonDocument doc(4096);
|
2018-11-30 14:26:15 +01:00
|
|
|
deserializeJson(doc, "[1,2,3]");
|
|
|
|
JsonArray array = doc.as<JsonArray>();
|
|
|
|
|
|
|
|
SECTION("Overflow") {
|
2019-02-15 15:53:53 +01:00
|
|
|
REQUIRE(array.getElement(3).isNull());
|
2018-11-30 14:26:15 +01:00
|
|
|
}
|
|
|
|
}
|