mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-13 02:26:33 +02:00
17 lines
350 B
C++
17 lines
350 B
C++
// ArduinoJson - arduinojson.org
|
|
// Copyright Benoit Blanchon 2014-2019
|
|
// MIT License
|
|
|
|
#include <ArduinoJson.h>
|
|
#include <catch.hpp>
|
|
|
|
TEST_CASE("JsonArray::get()") {
|
|
DynamicJsonDocument doc(4096);
|
|
deserializeJson(doc, "[1,2,3]");
|
|
JsonArray array = doc.as<JsonArray>();
|
|
|
|
SECTION("Overflow") {
|
|
REQUIRE(array.getElement(3).isNull());
|
|
}
|
|
}
|