summaryrefslogtreecommitdiffstats
path: root/tests/ChunkData/CopyBlocks.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-06-16 16:12:50 +0200
committerTycho <work.tycho+git@gmail.com>2014-06-16 16:12:50 +0200
commitee50790398791c38e563eee04cf12780fab74baf (patch)
tree2bbcebf1be2e567dce3f684884d8650c29883bd4 /tests/ChunkData/CopyBlocks.cpp
parentFix a few warnings (diff)
downloadcuberite-ee50790398791c38e563eee04cf12780fab74baf.tar
cuberite-ee50790398791c38e563eee04cf12780fab74baf.tar.gz
cuberite-ee50790398791c38e563eee04cf12780fab74baf.tar.bz2
cuberite-ee50790398791c38e563eee04cf12780fab74baf.tar.lz
cuberite-ee50790398791c38e563eee04cf12780fab74baf.tar.xz
cuberite-ee50790398791c38e563eee04cf12780fab74baf.tar.zst
cuberite-ee50790398791c38e563eee04cf12780fab74baf.zip
Diffstat (limited to '')
-rw-r--r--tests/ChunkData/CopyBlocks.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/ChunkData/CopyBlocks.cpp b/tests/ChunkData/CopyBlocks.cpp
index be8cab234..ec9451099 100644
--- a/tests/ChunkData/CopyBlocks.cpp
+++ b/tests/ChunkData/CopyBlocks.cpp
@@ -17,7 +17,20 @@
int main(int argc, char ** argv)
{
// Set up a cChunkData with known contents - all blocks 0x01, all metas 0x02:
- cChunkData Data;
+ 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;
memset(BlockTypes, 0x01, sizeof(BlockTypes));