summaryrefslogtreecommitdiffstats
path: root/tests/ChunkData/Copies.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ChunkData/Copies.cpp')
-rw-r--r--tests/ChunkData/Copies.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/ChunkData/Copies.cpp b/tests/ChunkData/Copies.cpp
index 4a672380f..440819e91 100644
--- a/tests/ChunkData/Copies.cpp
+++ b/tests/ChunkData/Copies.cpp
@@ -6,14 +6,19 @@
int main(int argc, char** argv)
{
- class cStarvationCallbacks
- : public cAllocationPool<cChunkData::sChunkSection, 1600>::cStarvationCallbacks
- {
- virtual void OnStartingUsingBuffer() {}
- virtual void OnStopUsingBuffer() {}
- virtual void OnBufferEmpty() {}
- };
- cAllocationPool<cChunkData::sChunkSection, 1600> Pool(std::auto_ptr<cAllocationPool<cChunkData::sChunkSection, 1600>::cStarvationCallbacks>(new cStarvationCallbacks()));
+ class cMockAllocationPool
+ : public cAllocationPool<cChunkData::sChunkSection>
+ {
+ virtual cChunkData::sChunkSection * Allocate()
+ {
+ return new cChunkData::sChunkSection();
+ }
+
+ virtual void Free(cChunkData::sChunkSection * a_Ptr)
+ {
+ delete a_Ptr;
+ }
+ } Pool;
{
cChunkData buffer(Pool);