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:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <catch.hpp>
|
||||
|
||||
#include "Literals.hpp"
|
||||
#include "custom_string.hpp"
|
||||
|
||||
using namespace ArduinoJson::detail;
|
||||
@@ -36,13 +37,13 @@ void common_tests(StringWriter& writer, const String& output) {
|
||||
|
||||
SECTION("OneString") {
|
||||
REQUIRE(4 == print(writer, "ABCD"));
|
||||
REQUIRE(std::string("ABCD") == output);
|
||||
REQUIRE("ABCD"_s == output);
|
||||
}
|
||||
|
||||
SECTION("TwoStrings") {
|
||||
REQUIRE(4 == print(writer, "ABCD"));
|
||||
REQUIRE(4 == print(writer, "EFGH"));
|
||||
REQUIRE(std::string("ABCDEFGH") == output);
|
||||
REQUIRE("ABCDEFGH"_s == output);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,5 +58,10 @@
|
||||
// issue #1914
|
||||
#define V7 7
|
||||
|
||||
// STM32, Mbed, Particle
|
||||
#define A0 16
|
||||
#define A1 17
|
||||
#define A2 18
|
||||
|
||||
// catch.hpp mutes several warnings, this file also allows to detect them
|
||||
#include "ArduinoJson.h"
|
||||
|
||||
@@ -7,6 +7,5 @@
|
||||
#include <string>
|
||||
|
||||
struct custom_char_traits : std::char_traits<char> {};
|
||||
struct custom_allocator : std::allocator<char> {};
|
||||
typedef std::basic_string<char, custom_char_traits, custom_allocator>
|
||||
custom_string;
|
||||
|
||||
typedef std::basic_string<char, custom_char_traits> custom_string;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <ArduinoJson.h>
|
||||
#include <catch.hpp>
|
||||
|
||||
#include "Literals.hpp"
|
||||
|
||||
#if defined(__clang__)
|
||||
# define CONFLICTS_WITH_BUILTIN_OPERATOR
|
||||
#endif
|
||||
@@ -111,7 +113,7 @@ TEST_CASE("unsigned char[]") {
|
||||
deserializeJson(doc, "{\"hello\":\"world\"}");
|
||||
JsonVariant variant = doc.as<JsonVariant>();
|
||||
|
||||
REQUIRE(std::string("world") == variant[key]);
|
||||
REQUIRE("world"_s == variant[key]);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -122,7 +124,7 @@ TEST_CASE("unsigned char[]") {
|
||||
deserializeJson(doc, "{\"hello\":\"world\"}");
|
||||
const JsonVariant variant = doc.as<JsonVariant>();
|
||||
|
||||
REQUIRE(std::string("world") == variant[key]);
|
||||
REQUIRE("world"_s == variant[key]);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -160,7 +162,7 @@ TEST_CASE("unsigned char[]") {
|
||||
JsonObject obj = doc.to<JsonObject>();
|
||||
obj[key] = "world";
|
||||
|
||||
REQUIRE(std::string("world") == obj["hello"]);
|
||||
REQUIRE("world"_s == obj["hello"]);
|
||||
}
|
||||
|
||||
SECTION("JsonObject::operator[] const") {
|
||||
@@ -170,7 +172,7 @@ TEST_CASE("unsigned char[]") {
|
||||
deserializeJson(doc, "{\"hello\":\"world\"}");
|
||||
|
||||
JsonObject obj = doc.as<JsonObject>();
|
||||
REQUIRE(std::string("world") == obj[key]);
|
||||
REQUIRE("world"_s == obj[key]);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -203,7 +205,7 @@ TEST_CASE("unsigned char[]") {
|
||||
JsonObject obj = doc.to<JsonObject>();
|
||||
obj["hello"] = value;
|
||||
|
||||
REQUIRE(std::string("world") == obj["hello"]);
|
||||
REQUIRE("world"_s == obj["hello"]);
|
||||
}
|
||||
|
||||
SECTION("set()") {
|
||||
@@ -213,7 +215,7 @@ TEST_CASE("unsigned char[]") {
|
||||
JsonObject obj = doc.to<JsonObject>();
|
||||
obj["hello"].set(value);
|
||||
|
||||
REQUIRE(std::string("world") == obj["hello"]);
|
||||
REQUIRE("world"_s == obj["hello"]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +227,7 @@ TEST_CASE("unsigned char[]") {
|
||||
JsonArray arr = doc.to<JsonArray>();
|
||||
arr.add(value);
|
||||
|
||||
REQUIRE(std::string("world") == arr[0]);
|
||||
REQUIRE("world"_s == arr[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,7 +240,7 @@ TEST_CASE("unsigned char[]") {
|
||||
arr.add("hello");
|
||||
arr[0].set(value);
|
||||
|
||||
REQUIRE(std::string("world") == arr[0]);
|
||||
REQUIRE("world"_s == arr[0]);
|
||||
}
|
||||
|
||||
SECTION("operator=") {
|
||||
@@ -249,7 +251,7 @@ TEST_CASE("unsigned char[]") {
|
||||
arr.add("hello");
|
||||
arr[0] = value;
|
||||
|
||||
REQUIRE(std::string("world") == arr[0]);
|
||||
REQUIRE("world"_s == arr[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user