2015-04-16 14:10:44 +02:00
|
|
|
#include "../../../implementations/caching/CachingBlockStore.h"
|
2015-04-15 15:46:35 +02:00
|
|
|
#include "../../../implementations/testfake/FakeBlockStore.h"
|
|
|
|
#include "../../testutils/BlockStoreTest.h"
|
|
|
|
#include "google/gtest/gtest.h"
|
2015-08-31 23:04:56 +02:00
|
|
|
#include <messmer/cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h>
|
2015-04-15 15:46:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
using blockstore::BlockStore;
|
2015-04-16 14:10:44 +02:00
|
|
|
using blockstore::caching::CachingBlockStore;
|
2015-04-15 15:46:35 +02:00
|
|
|
using blockstore::testfake::FakeBlockStore;
|
2015-07-21 18:19:34 +02:00
|
|
|
using cpputils::unique_ref;
|
|
|
|
using cpputils::make_unique_ref;
|
2015-04-15 15:46:35 +02:00
|
|
|
|
2015-04-16 14:10:44 +02:00
|
|
|
class CachingBlockStoreTestFixture: public BlockStoreTestFixture {
|
2015-04-15 15:46:35 +02:00
|
|
|
public:
|
2015-07-21 18:19:34 +02:00
|
|
|
unique_ref<BlockStore> createBlockStore() override {
|
|
|
|
return make_unique_ref<CachingBlockStore>(make_unique_ref<FakeBlockStore>());
|
2015-04-15 15:46:35 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-04-16 14:10:44 +02:00
|
|
|
INSTANTIATE_TYPED_TEST_CASE_P(Caching, BlockStoreTest, CachingBlockStoreTestFixture);
|
2015-04-15 15:46:35 +02:00
|
|
|
|
|
|
|
//TODO Add specific tests for the blockstore
|