summaryrefslogtreecommitdiffstats
path: root/tests/ChunkData/ArraytoCoord.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-06-14 20:46:34 +0200
committerTycho <work.tycho+git@gmail.com>2014-06-14 20:46:34 +0200
commit94c48febd2f596648fc2616a8a577316a219b581 (patch)
tree3275d163808851c7413cd9abb5f3019788823fda /tests/ChunkData/ArraytoCoord.cpp
parentreverted accedental android changes (diff)
downloadcuberite-94c48febd2f596648fc2616a8a577316a219b581.tar
cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.gz
cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.bz2
cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.lz
cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.xz
cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.zst
cuberite-94c48febd2f596648fc2616a8a577316a219b581.zip
Diffstat (limited to 'tests/ChunkData/ArraytoCoord.cpp')
-rw-r--r--tests/ChunkData/ArraytoCoord.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/ChunkData/ArraytoCoord.cpp b/tests/ChunkData/ArraytoCoord.cpp
index 3f22d239a..9d0ca6c8c 100644
--- a/tests/ChunkData/ArraytoCoord.cpp
+++ b/tests/ChunkData/ArraytoCoord.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;
{
// Test first segment