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

@@ -6,6 +6,7 @@
#include <catch.hpp>
#include "Allocators.hpp"
#include "Literals.hpp"
using ArduinoJson::detail::addPadding;
@@ -20,7 +21,7 @@ TEST_CASE("JsonDocument constructor") {
SECTION("JsonDocument(const JsonDocument&)") {
{
JsonDocument doc1(&spyingAllocator);
doc1.set(std::string("The size of this string is 32!!"));
doc1.set("The size of this string is 32!!"_s);
JsonDocument doc2(doc1);
@@ -38,7 +39,7 @@ TEST_CASE("JsonDocument constructor") {
SECTION("JsonDocument(JsonDocument&&)") {
{
JsonDocument doc1(&spyingAllocator);
doc1.set(std::string("The size of this string is 32!!"));
doc1.set("The size of this string is 32!!"_s);
JsonDocument doc2(std::move(doc1));
@@ -117,4 +118,31 @@ TEST_CASE("JsonDocument constructor") {
REQUIRE(doc2.as<std::string>() == "hello");
}
SECTION("JsonDocument(JsonVariantConst)") {
JsonDocument doc1;
deserializeJson(doc1, "\"hello\"");
JsonDocument doc2(doc1.as<JsonVariantConst>());
REQUIRE(doc2.as<std::string>() == "hello");
}
SECTION("JsonDocument(ElementProxy)") {
JsonDocument doc1;
deserializeJson(doc1, "[\"hello\",\"world\"]");
JsonDocument doc2(doc1[1]);
REQUIRE(doc2.as<std::string>() == "world");
}
SECTION("JsonDocument(MemberProxy)") {
JsonDocument doc1;
deserializeJson(doc1, "{\"hello\":\"world\"}");
JsonDocument doc2(doc1["hello"]);
REQUIRE(doc2.as<std::string>() == "world");
}
}