2016-02-11 15:19:58 +01:00
|
|
|
#include "blockstore/implementations/inmemory/InMemoryBlock.h"
|
|
|
|
#include "blockstore/implementations/inmemory/InMemoryBlockStore.h"
|
2015-03-12 14:27:51 +01:00
|
|
|
#include "../../testutils/BlockStoreTest.h"
|
|
|
|
#include "../../testutils/BlockStoreWithRandomKeysTest.h"
|
2016-02-11 15:19:58 +01:00
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h>
|
2014-12-09 17:19:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
using blockstore::BlockStore;
|
|
|
|
using blockstore::BlockStoreWithRandomKeys;
|
|
|
|
using blockstore::inmemory::InMemoryBlockStore;
|
2015-07-21 18:19:34 +02:00
|
|
|
using cpputils::unique_ref;
|
|
|
|
using cpputils::make_unique_ref;
|
2014-12-09 17:19:59 +01:00
|
|
|
|
|
|
|
class InMemoryBlockStoreTestFixture: public BlockStoreTestFixture {
|
|
|
|
public:
|
2015-07-21 18:19:34 +02:00
|
|
|
unique_ref<BlockStore> createBlockStore() override {
|
|
|
|
return make_unique_ref<InMemoryBlockStore>();
|
2014-12-09 17:19:59 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
INSTANTIATE_TYPED_TEST_CASE_P(InMemory, BlockStoreTest, InMemoryBlockStoreTestFixture);
|
|
|
|
|
|
|
|
class InMemoryBlockStoreWithRandomKeysTestFixture: public BlockStoreWithRandomKeysTestFixture {
|
|
|
|
public:
|
2015-07-21 18:19:34 +02:00
|
|
|
unique_ref<BlockStoreWithRandomKeys> createBlockStore() override {
|
|
|
|
return make_unique_ref<InMemoryBlockStore>();
|
2014-12-09 17:19:59 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
INSTANTIATE_TYPED_TEST_CASE_P(InMemory, BlockStoreWithRandomKeysTest, InMemoryBlockStoreWithRandomKeysTestFixture);
|