mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-09-12 09:36:59 +00:00
[ArduinoJson] Update external library ArduinoJson.
Is needed to compile new ESP32 code.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
// ArduinoJson - arduinojson.org
|
||||
// Copyright Benoit Blanchon 2014-2018
|
||||
// MIT License
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
#include <catch.hpp>
|
||||
|
||||
TEST_CASE("JsonArray::size()") {
|
||||
DynamicJsonBuffer _jsonBuffer;
|
||||
JsonArray& _array = _jsonBuffer.createArray();
|
||||
|
||||
SECTION("increases after add()") {
|
||||
_array.add("hello");
|
||||
REQUIRE(1U == _array.size());
|
||||
|
||||
_array.add("world");
|
||||
REQUIRE(2U == _array.size());
|
||||
}
|
||||
|
||||
SECTION("remains the same after set()") {
|
||||
_array.add("hello");
|
||||
REQUIRE(1U == _array.size());
|
||||
|
||||
_array.set(0, "hello");
|
||||
REQUIRE(1U == _array.size());
|
||||
}
|
||||
|
||||
SECTION("remains the same after assigment") {
|
||||
_array.add("hello");
|
||||
REQUIRE(1U == _array.size());
|
||||
|
||||
_array[0] = "hello";
|
||||
REQUIRE(1U == _array.size());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user