Remove JSON_ARRAY_SIZE(), JSON_OBJECT_SIZE(), and JSON_STRING_SIZE()

This commit is contained in:
Benoit Blanchon committed 2023-03-29 19:18:06 +02:00
1 parent 0328f66340
commit 3f43c2b816
36 files changed
+395 -340

No files matched your search

+4 -1
View File
@@ -6,6 +6,9 @@
#include <ArduinoJson.h>
#include <catch.hpp>
using ArduinoJson::detail::sizeofObject;
using ArduinoJson::detail::sizeofString;
TEST_CASE("Valid JSON strings value") {
struct TestCase {
const char* input;
@@ -93,7 +96,7 @@ TEST_CASE("Invalid JSON string") {
}
TEST_CASE("Not enough room to save the key") {
JsonDocument doc(JSON_OBJECT_SIZE(1) + 8);
JsonDocument doc(sizeofObject(1) + 8);
SECTION("Quoted string") {
REQUIRE(deserializeJson(doc, "{\"example\":1}") ==