Inverted dependency between MemoryPool and string adapters.

Inserted a null after each raw string in the pool.
This commit is contained in:
Benoit Blanchon
2020-07-08 09:38:27 +02:00
parent 7e58347fbe
commit 04c59985a1
25 changed files with 143 additions and 119 deletions

View File

@ -56,7 +56,7 @@ TEST_CASE("deserialize JSON array with a StaticJsonDocument") {
deserializeJson(doc, " [ \"1234567\" ] ");
REQUIRE(JSON_ARRAY_SIZE(1) + JSON_STRING_SIZE(8) == doc.memoryUsage());
REQUIRE(JSON_ARRAY_SIZE(1) + JSON_STRING_SIZE(7) == doc.memoryUsage());
// note: we use a string of 8 bytes to be sure that the StaticMemoryPool
// will not insert bytes to enforce alignement
}