diff options
Diffstat (limited to 'tests/ChunkData/Coordinates.cpp')
-rw-r--r-- | tests/ChunkData/Coordinates.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/ChunkData/Coordinates.cpp b/tests/ChunkData/Coordinates.cpp index 48d731c7e..d5abbb143 100644 --- a/tests/ChunkData/Coordinates.cpp +++ b/tests/ChunkData/Coordinates.cpp @@ -6,8 +6,16 @@ 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())); { - cChunkData buffer; + cChunkData buffer(Pool); // Empty chunks buffer.SetBlock(0, 0, 0, 0xAB); @@ -105,7 +113,7 @@ int main(int argc, char** argv) } { - cChunkData buffer; + cChunkData buffer(Pool); // Zero's buffer.SetBlock(0, 0, 0, 0x0); @@ -122,9 +130,9 @@ int main(int argc, char** argv) { // Operator = - cChunkData buffer; + cChunkData buffer(Pool); buffer.SetBlock(0, 0, 0, 0x42); - cChunkData copy; + cChunkData copy(Pool); #if __cplusplus < 201103L copy = buffer; #else @@ -136,7 +144,7 @@ int main(int argc, char** argv) #else copy = std::move(copy); #endif - testassert(copy.GetBlock(0, 0, 0) == 0x42); + testassert(copy.GetBlock(0,0,0) == 0x42); } return 0; |