mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 12:32:17 +02:00
Remove JsonDocument::data()
and JsonDocument::memoryPool()
This commit is contained in:
@ -12,7 +12,7 @@ TEST_CASE("StringCopier") {
|
||||
|
||||
SECTION("Works when buffer is big enough") {
|
||||
MemoryPool pool(buffer, addPadding(JSON_STRING_SIZE(5)));
|
||||
StringCopier str(pool);
|
||||
StringCopier str(&pool);
|
||||
|
||||
str.startString();
|
||||
str.append("hello");
|
||||
@ -24,7 +24,7 @@ TEST_CASE("StringCopier") {
|
||||
|
||||
SECTION("Returns null when too small") {
|
||||
MemoryPool pool(buffer, sizeof(void*));
|
||||
StringCopier str(pool);
|
||||
StringCopier str(&pool);
|
||||
|
||||
str.startString();
|
||||
str.append("hello world!");
|
||||
@ -35,7 +35,7 @@ TEST_CASE("StringCopier") {
|
||||
|
||||
SECTION("Increases size of memory pool") {
|
||||
MemoryPool pool(buffer, addPadding(JSON_STRING_SIZE(6)));
|
||||
StringCopier str(pool);
|
||||
StringCopier str(&pool);
|
||||
|
||||
str.startString();
|
||||
str.save();
|
||||
@ -46,7 +46,7 @@ TEST_CASE("StringCopier") {
|
||||
|
||||
SECTION("Works when memory pool is 0 bytes") {
|
||||
MemoryPool pool(buffer, 0);
|
||||
StringCopier str(pool);
|
||||
StringCopier str(&pool);
|
||||
|
||||
str.startString();
|
||||
REQUIRE(str.isValid() == false);
|
||||
@ -55,7 +55,7 @@ TEST_CASE("StringCopier") {
|
||||
}
|
||||
|
||||
static const char* addStringToPool(MemoryPool& pool, const char* s) {
|
||||
StringCopier str(pool);
|
||||
StringCopier str(&pool);
|
||||
str.startString();
|
||||
str.append(s);
|
||||
return str.save().c_str();
|
||||
|
Reference in New Issue
Block a user