libcryfs/test/implementations/caching/cache/testutils/CacheTest.cpp

14 lines
357 B
C++
Raw Normal View History

2015-04-28 11:56:07 +02:00
#include "CacheTest.h"
void CacheTest::push(int key, int value) {
return _cache.push(MinimalKeyType::create(key), MinimalValueType::create(value));
}
boost::optional<int> CacheTest::pop(int key) {
boost::optional<MinimalValueType> entry = _cache.pop(MinimalKeyType::create(key));
if (!entry) {
return boost::none;
}
return entry->value();
}