mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-29 18:27:37 +02:00
Remove JSON_ARRAY_SIZE()
, JSON_OBJECT_SIZE()
, and JSON_STRING_SIZE()
This commit is contained in:
@ -8,6 +8,8 @@
|
||||
#define ARDUINOJSON_ENABLE_ARDUINO_STREAM 1
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
using ArduinoJson::detail::sizeofArray;
|
||||
|
||||
struct PrintOneCharacterAtATime {
|
||||
static size_t printStringTo(const std::string& s, Print& p) {
|
||||
size_t result = 0;
|
||||
@ -139,6 +141,6 @@ TEST_CASE("Printable") {
|
||||
REQUIRE(doc.size() == 2);
|
||||
CHECK(doc[0] == "Hello World!");
|
||||
CHECK(doc[1] == "Hello World!");
|
||||
CHECK(doc.memoryUsage() == JSON_ARRAY_SIZE(2) + 13);
|
||||
CHECK(doc.memoryUsage() == sizeofArray(2) + 13);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user