Changeset View
Changeset View
Standalone View
Standalone View
src/test/cuckoocache_tests.cpp
Show All 19 Lines | |||||
* 2. Some test methods are templated to allow for easier testing | * 2. Some test methods are templated to allow for easier testing | ||||
* against new versions / comparing | * against new versions / comparing | ||||
* 3. Results should be treated as a regression test, i.e., did the behavior | * 3. Results should be treated as a regression test, i.e., did the behavior | ||||
* change significantly from what was expected. This can be OK, depending on | * change significantly from what was expected. This can be OK, depending on | ||||
* the nature of the change, but requires updating the tests to reflect the new | * the nature of the change, but requires updating the tests to reflect the new | ||||
* expected behavior. For example improving the hit rate may cause some tests | * expected behavior. For example improving the hit rate may cause some tests | ||||
* using BOOST_CHECK_CLOSE to fail. | * using BOOST_CHECK_CLOSE to fail. | ||||
*/ | */ | ||||
BOOST_AUTO_TEST_SUITE(cuckoocache_tests); | BOOST_AUTO_TEST_SUITE(cuckoocache_tests) | ||||
/** | /** | ||||
* Example key/value element. The key is 28 bytes long and the value 4, for a | * Example key/value element. The key is 28 bytes long and the value 4, for a | ||||
* total of 32 bytes. | * total of 32 bytes. | ||||
*/ | */ | ||||
struct TestMapElement { | struct TestMapElement { | ||||
struct KeyType { | struct KeyType { | ||||
std::array<uint8_t, 28> data; | std::array<uint8_t, 28> data; | ||||
▲ Show 20 Lines • Show All 488 Lines • Show Last 20 Lines |