summaryrefslogtreecommitdiffstats
path: root/tests/ChunkData/ArraytoCoord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ChunkData/ArraytoCoord.cpp')
-rw-r--r--tests/ChunkData/ArraytoCoord.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/ChunkData/ArraytoCoord.cpp b/tests/ChunkData/ArraytoCoord.cpp
index 0daf38f7b..80bcc5283 100644
--- a/tests/ChunkData/ArraytoCoord.cpp
+++ b/tests/ChunkData/ArraytoCoord.cpp
@@ -6,9 +6,18 @@
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()));
+ {
+
// Test first segment
- cChunkData buffer;
+ cChunkData buffer(Pool);
BLOCKTYPE SrcBlockBuffer[16 * 16 * 256];
memset(SrcBlockBuffer, 0x00, sizeof(SrcBlockBuffer));
@@ -35,7 +44,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 +71,7 @@ int main(int argc, char** argv)
{
// test zeros
- cChunkData buffer;
+ cChunkData buffer(Pool);
BLOCKTYPE SrcBlockBuffer[16 * 16 * 256];
memset(SrcBlockBuffer, 0x00, sizeof(SrcBlockBuffer));