mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01: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(); | ||||
|   | ||||
| @@ -12,7 +12,7 @@ using namespace ARDUINOJSON_NAMESPACE; | ||||
| static void testCodepoint(uint32_t codepoint, std::string expected) { | ||||
|   char buffer[4096]; | ||||
|   MemoryPool pool(buffer, 4096); | ||||
|   StringCopier str(pool); | ||||
|   StringCopier str(&pool); | ||||
|   str.startString(); | ||||
|  | ||||
|   CAPTURE(codepoint); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user