buildaworldnet / IrrlichtBAW

Build A World fork of Irrlicht
http://www.buildaworld.net
Apache License 2.0
122 stars 27 forks source link

Added a unit test for LRU #541

Closed Hazardu closed 4 years ago

Hazardu commented 4 years ago

Removed Przemog1's example, and replaced it with a unit test for LRU cache. At the moment, there is a line that behaves not how its supposed to do. Looking at line 66 of main.cpp, its supposed to insert a new value into a cache. Cache's capacity is 5, and it already has one element. Expected behavior is adding an element with address of 1 in the array in FixedCapacityDoublyLinkedList.h Current behavior is as follows: alloc_address returns 472, triggers assert cap > address.