Skip to content

Commit 8098017

Browse files
committed
Remove polymorphic allocator
1 parent 5904b5e commit 8098017

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

test/corelib/src/stateful_allocator_tests.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,23 @@ TEST_CASE("test_string_allocation")
3434

3535
SECTION("construct")
3636
{
37-
{
38-
my_json j("String too long for short string", alloc);
39-
}
40-
//CHECK(a_pool.allocate_count_ == a_pool.deallocate_count_);
37+
my_json j("String too long for short string", alloc);
38+
//CHECK(a_pool.allocate_count_ == a_pool.deallocate_count_);
4139
// CHECK(a_pool.construct_count_ == a_pool.destroy_count_);
4240
}
4341

42+
SECTION("emplace_back")
43+
{
44+
my_json j(json_array_arg, semantic_tag::none, alloc);
45+
j.emplace_back("String too long for short string", alloc);
46+
47+
std::cout << j << "\n";
48+
49+
50+
//CHECK(a_pool.allocate_count_ == a_pool.deallocate_count_);
51+
// CHECK(a_pool.construct_count_ == a_pool.destroy_count_);
52+
}
53+
4454
SECTION("parse")
4555
{
4656
FreeListAllocator<char> alloc2(true);

0 commit comments

Comments
 (0)