Preallocate pool list

This commit is contained in:
Benoit Blanchon
2023-07-21 10:38:35 +02:00
parent f427706e06
commit 1a14499612
19 changed files with 183 additions and 143 deletions

View File

@ -281,7 +281,7 @@ TEST_CASE("deserialize JSON array under memory constraints") {
}
SECTION("allocation of pool fails") {
allocator.setCountdown(1);
allocator.setCountdown(0);
char input[] = "[1]";
DeserializationError err = deserializeJson(doc, input);
@ -291,7 +291,7 @@ TEST_CASE("deserialize JSON array under memory constraints") {
}
SECTION("allocation of string fails in array") {
allocator.setCountdown(2);
allocator.setCountdown(1);
char input[] = "[0,\"hi!\"]";
DeserializationError err = deserializeJson(doc, input);