summaryrefslogtreecommitdiffstats
path: root/tests/ChunkData/CopyBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ChunkData/CopyBlocks.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/ChunkData/CopyBlocks.cpp b/tests/ChunkData/CopyBlocks.cpp
index db3d391c3..ec9451099 100644
--- a/tests/ChunkData/CopyBlocks.cpp
+++ b/tests/ChunkData/CopyBlocks.cpp
@@ -17,14 +17,19 @@
int main(int argc, char ** argv)
{
// Set up a cChunkData with known contents - all blocks 0x01, all metas 0x02:
- 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 Data(Pool);
cChunkDef::BlockTypes BlockTypes;
cChunkDef::BlockNibbles BlockMetas;