diff options
author | Mattes D <github@xoft.cz> | 2014-06-16 16:00:14 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-06-16 16:00:14 +0200 |
commit | 24b0878af753c0873f71c738be0c1ac94f6c062b (patch) | |
tree | 01275c7080eb2cc3c821a2a398f8f2d2f78ff47c /tests/ChunkData/ArraytoCoord.cpp | |
parent | Fixed a copypasta error in WormNestCaves generator settings. (diff) | |
parent | Added override (diff) | |
download | cuberite-24b0878af753c0873f71c738be0c1ac94f6c062b.tar cuberite-24b0878af753c0873f71c738be0c1ac94f6c062b.tar.gz cuberite-24b0878af753c0873f71c738be0c1ac94f6c062b.tar.bz2 cuberite-24b0878af753c0873f71c738be0c1ac94f6c062b.tar.lz cuberite-24b0878af753c0873f71c738be0c1ac94f6c062b.tar.xz cuberite-24b0878af753c0873f71c738be0c1ac94f6c062b.tar.zst cuberite-24b0878af753c0873f71c738be0c1ac94f6c062b.zip |
Diffstat (limited to 'tests/ChunkData/ArraytoCoord.cpp')
-rw-r--r-- | tests/ChunkData/ArraytoCoord.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/ChunkData/ArraytoCoord.cpp b/tests/ChunkData/ArraytoCoord.cpp index 0daf38f7b..9d0ca6c8c 100644 --- a/tests/ChunkData/ArraytoCoord.cpp +++ b/tests/ChunkData/ArraytoCoord.cpp @@ -6,9 +6,23 @@ int main(int argc, char** argv) { + 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; { + // Test first segment - cChunkData buffer; + cChunkData buffer(Pool); BLOCKTYPE SrcBlockBuffer[16 * 16 * 256]; memset(SrcBlockBuffer, 0x00, sizeof(SrcBlockBuffer)); @@ -35,7 +49,7 @@ int main(int argc, char** argv) { // test following segment - cChunkData buffer; + cChunkData buffer(Pool); BLOCKTYPE SrcBlockBuffer[16 * 16 * 256]; memset(SrcBlockBuffer, 0x00, sizeof(SrcBlockBuffer)); @@ -62,7 +76,7 @@ int main(int argc, char** argv) { // test zeros - cChunkData buffer; + cChunkData buffer(Pool); BLOCKTYPE SrcBlockBuffer[16 * 16 * 256]; memset(SrcBlockBuffer, 0x00, sizeof(SrcBlockBuffer)); |