diff options
Diffstat (limited to 'EASTL/test/source/TestAllocator.cpp')
-rw-r--r-- | EASTL/test/source/TestAllocator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/EASTL/test/source/TestAllocator.cpp b/EASTL/test/source/TestAllocator.cpp index 8cfaadd..2a28c07 100644 --- a/EASTL/test/source/TestAllocator.cpp +++ b/EASTL/test/source/TestAllocator.cpp @@ -129,7 +129,6 @@ static int TestFixedAllocator() typedef eastl::list<int, fixed_allocator_with_overflow> IntList; typedef IntList::node_type IntListNode; - IntList intList1; const size_t kAlignOfIntListNode = EA_ALIGN_OF(IntListNode); // ensure the fixed buffer contains the default value that will be replaced @@ -140,6 +139,8 @@ static int TestFixedAllocator() EATEST_VERIFY(buffer1[i].mValue == DEFAULT_VALUE); } + IntList intList1; + // replace all the values in the local buffer with the test value intList1.get_allocator().init(buffer1, sizeof(buffer1), sizeof(IntListNode), kAlignOfIntListNode); for (size_t i = 0; i < kBufferCount; i++) @@ -150,6 +151,8 @@ static int TestFixedAllocator() { EATEST_VERIFY(buffer1[i].mValue == TEST_VALUE); } + + intList1.clear(); } { // fixed_allocator_with_overflow |