Removed the indirection via StringSlot

This commit is contained in:
Benoit Blanchon
2018-11-27 17:28:19 +01:00
parent 45f4e5ac20
commit a60162ba76
23 changed files with 105 additions and 164 deletions

View File

@ -28,11 +28,11 @@ TEST_CASE("MemoryPool::size()") {
}
SECTION("Decreases after freezeString()") {
StringSlot* a = memoryPool.allocExpandableString();
StringSlot a = memoryPool.allocExpandableString();
memoryPool.freezeString(a, 1);
REQUIRE(memoryPool.size() == JSON_STRING_SIZE(1));
StringSlot* b = memoryPool.allocExpandableString();
StringSlot b = memoryPool.allocExpandableString();
memoryPool.freezeString(b, 1);
REQUIRE(memoryPool.size() == 2 * JSON_STRING_SIZE(1));
}