Call shrinkToFit() in deserializeJson() and deserializeMsgPack()

This commit is contained in:
Benoit Blanchon committed 2023-07-31 17:34:17 +02:00
1 parent 752d01a7f1
commit 218a12ca46
14 files changed
+209 -67

No files matched your search

+4
View File
@@ -120,6 +120,7 @@ TEST_CASE("Allocation of the key fails") {
Reallocate(sizeofStringBuffer(), sizeofString("hello")),
Allocate(sizeofPool()),
AllocateFail(sizeofStringBuffer()),
ReallocateFail(sizeofPool(), sizeofObject(1)),
});
}
@@ -141,6 +142,7 @@ TEST_CASE("Allocation of the key fails") {
Reallocate(sizeofStringBuffer(), sizeofString("hello")),
Allocate(sizeofPool()),
AllocateFail(sizeofStringBuffer()),
ReallocateFail(sizeofPool(), sizeofObject(1)),
});
}
}
@@ -171,6 +173,7 @@ TEST_CASE("Deduplicate values") {
Reallocate(sizeofStringBuffer(), sizeofString("example")),
Allocate(sizeofStringBuffer()),
Deallocate(sizeofStringBuffer()),
Reallocate(sizeofPool(), sizeofArray(2)),
});
}
@@ -190,5 +193,6 @@ TEST_CASE("Deduplicate keys") {
Reallocate(sizeofStringBuffer(), sizeofString("example")),
Allocate(sizeofStringBuffer()),
Deallocate(sizeofStringBuffer()),
Reallocate(sizeofPool(), sizeofArray(2) + 2 * sizeofObject(1)),
});
}