forked from bblanchon/ArduinoJson
Remove JSON_ARRAY_SIZE(), JSON_OBJECT_SIZE(), and JSON_STRING_SIZE()
This commit is contained in:
1 parent
0328f66340
commit
3f43c2b816
36 files changed
+395
-340
No files matched your search
@@ -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}") ==
|
||||
|
||||
Reference in new issue
Block a user