Update ArduinoJSON, esp-nimble-cpp, Arduino Core, ESP-IDF (#448)

* ArduinoJSON 7.1.0

* Update nimble and arduino core

* Update nuki_ble
This commit is contained in:
iranl
2024-08-11 11:20:31 +02:00
committed by GitHub
parent 4af90cbc79
commit 9d55c2173d
216 changed files with 6437 additions and 5705 deletions

View File

@@ -7,6 +7,7 @@
#include <catch.hpp>
#include "Allocators.hpp"
#include "Literals.hpp"
TEST_CASE("JsonArray::operator[]") {
SpyingAllocator spy;
@@ -129,7 +130,7 @@ TEST_CASE("JsonArray::operator[]") {
}
SECTION("should duplicate std::string") {
array[0] = std::string("world");
array[0] = "world"_s;
REQUIRE(spy.log() == AllocatorLog{
Allocate(sizeofPool()),
Allocate(sizeofString("world")),
@@ -150,7 +151,7 @@ TEST_CASE("JsonArray::operator[]") {
array.add("hello");
array[0].set(vla);
REQUIRE(std::string("world") == array[0]);
REQUIRE("world"_s == array[0]);
}
SECTION("operator=(VLA)") {
@@ -161,7 +162,16 @@ TEST_CASE("JsonArray::operator[]") {
array.add("hello");
array[0] = vla;
REQUIRE(std::string("world") == array[0]);
REQUIRE("world"_s == array[0]);
}
#endif
SECTION("Use a JsonVariant as index") {
array[0] = 1;
array[1] = 2;
array[2] = 3;
REQUIRE(array[array[1]] == 3);
REQUIRE(array[array[3]] == nullptr);
}
}