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

@@ -5,6 +5,8 @@
#include <ArduinoJson.h>
#include <catch.hpp>
#include "Literals.hpp"
TEST_CASE("JsonDocument::remove()") {
JsonDocument doc;
@@ -31,7 +33,7 @@ TEST_CASE("JsonDocument::remove()") {
doc["a"] = 1;
doc["b"] = 2;
doc.remove(std::string("b"));
doc.remove("b"_s);
REQUIRE(doc.as<std::string>() == "{\"a\":1}");
}
@@ -49,4 +51,25 @@ TEST_CASE("JsonDocument::remove()") {
REQUIRE(doc.as<std::string>() == "{\"a\":1}");
}
#endif
SECTION("remove(JsonVariant) from object") {
doc["a"] = 1;
doc["b"] = 2;
doc["c"] = "b";
doc.remove(doc["c"]);
REQUIRE(doc.as<std::string>() == "{\"a\":1,\"c\":\"b\"}");
}
SECTION("remove(JsonVariant) from array") {
doc[0] = 3;
doc[1] = 2;
doc[2] = 1;
doc.remove(doc[2]);
doc.remove(doc[3]); // noop
REQUIRE(doc.as<std::string>() == "[3,1]");
}
}