diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-21 23:14:23 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-21 23:14:23 +0200 |
commit | 7615ed90c020b88db52b0b094f00cd028e326b5a (patch) | |
tree | ca7f647e77195a6346a2333f3d9fe5292cd2ed40 /tests/ChunkData/CopyBlocks.cpp | |
parent | Fixed invalid iterators (diff) | |
parent | Merge branch 'master' of https://github.com/mc-server/MCServer (diff) | |
download | cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.gz cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.bz2 cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.lz cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.xz cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.zst cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.zip |
Diffstat (limited to '')
-rw-r--r-- | tests/ChunkData/CopyBlocks.cpp | 15 |
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)); |