libcryfs/test/blockstore/implementations/compressing/CompressingBlockStoreTest.cpp
Sebastian Messmer cc7b38b3c1 - run-clang-tidy.sh also runs on test cases.
- fix clang-tidy warnings in test cases
2017-12-01 15:01:49 +00:00

28 lines
1.1 KiB
C++

#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"
#include "../../testutils/BlockStoreTest.h"
#include <gtest/gtest.h>
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>);