mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Fixed DynamicJsonBuffer::clear() not resetting allocation size (fixes #561)
				
					
				
			This commit is contained in:
		| @@ -46,7 +46,7 @@ TEST_CASE("DynamicJsonBuffer::alloc()") { | ||||
|     REQUIRE(allocatorLog.str() == "A1A2FF"); | ||||
|   } | ||||
|  | ||||
|   SECTION("Keeps increasing allocation size after clear") { | ||||
|   SECTION("Resets allocation size after clear()") { | ||||
|     allocatorLog.str(""); | ||||
|     { | ||||
|       DynamicJsonBufferBase<SpyingAllocator> buffer(1); | ||||
| @@ -55,7 +55,7 @@ TEST_CASE("DynamicJsonBuffer::alloc()") { | ||||
|       buffer.clear(); | ||||
|       buffer.alloc(1); | ||||
|     } | ||||
|     REQUIRE(allocatorLog.str() == "A1A2FFA4F"); | ||||
|     REQUIRE(allocatorLog.str() == "A1A2FFA1F"); | ||||
|   } | ||||
|  | ||||
|   SECTION("Makes a big allocation when needed") { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user