2016-02-11 15:19:58 +01:00
|
|
|
#include "blockstore/implementations/compressing/CompressingBlockStore.h"
|
|
|
|
#include "blockstore/implementations/compressing/compressors/Gzip.h"
|
|
|
|
#include "blockstore/implementations/compressing/compressors/RunLengthEncoding.h"
|
|
|
|
#include "blockstore/implementations/testfake/FakeBlockStore.h"
|
2015-12-14 17:17:16 +01:00
|
|
|
#include "../../testutils/BlockStoreTest.h"
|
2016-02-11 15:19:58 +01:00
|
|
|
#include <gtest/gtest.h>
|
2015-12-14 17:17:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
using blockstore::BlockStore;
|
|
|
|
using blockstore::compressing::CompressingBlockStore;
|
|
|
|
using blockstore::compressing::Gzip;
|
|
|
|
using blockstore::compressing::RunLengthEncoding;
|
|
|
|
using blockstore::testfake::FakeBlockStore;
|
|
|
|
|
|
|
|
using cpputils::make_unique_ref;
|
|
|
|
using cpputils::unique_ref;
|
|
|
|
|
|
|
|
template<class Compressor>
|
|
|
|
class CompressingBlockStoreTestFixture: public BlockStoreTestFixture {
|
|
|
|
public:
|
|
|
|
unique_ref<BlockStore> createBlockStore() override {
|
|
|
|
return make_unique_ref<CompressingBlockStore<Compressor>>(make_unique_ref<FakeBlockStore>());
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
INSTANTIATE_TYPED_TEST_CASE_P(Compressing_Gzip, BlockStoreTest, CompressingBlockStoreTestFixture<Gzip>);
|
|
|
|
INSTANTIATE_TYPED_TEST_CASE_P(Compressing_RunLengthEncoding, BlockStoreTest, CompressingBlockStoreTestFixture<RunLengthEncoding>);
|