libcryfs/test/blockstore/implementations/inmemory/InMemoryBlockStoreTest.cpp

32 lines
1.1 KiB
C++
Raw Normal View History

#include "blockstore/implementations/inmemory/InMemoryBlock.h"
#include "blockstore/implementations/inmemory/InMemoryBlockStore.h"
#include "../../testutils/BlockStoreTest.h"
#include "../../testutils/BlockStoreWithRandomKeysTest.h"
#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;
using cpputils::unique_ref;
using cpputils::make_unique_ref;
2014-12-09 17:19:59 +01:00
class InMemoryBlockStoreTestFixture: public BlockStoreTestFixture {
public:
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:
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);