libcryfs/test/implementations/onblocks/testutils/BlobStoreTest.h

30 lines
768 B
C
Raw Normal View History

2015-10-15 13:10:20 +02:00
#pragma once
#ifndef MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_TESTUTILS_BLOBSTORETEST_H_
#define MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_TESTUTILS_BLOBSTORETEST_H_
2015-03-05 22:23:30 +01:00
#include <google/gtest/gtest.h>
#include "../../../../interface/BlobStore.h"
class BlobStoreTest: public ::testing::Test {
public:
BlobStoreTest();
2015-03-05 22:34:51 +01:00
static constexpr uint32_t BLOCKSIZE_BYTES = 4096;
2015-03-05 22:23:30 +01:00
2015-06-26 15:59:18 +02:00
cpputils::unique_ref<blobstore::BlobStore> blobStore;
cpputils::unique_ref<blobstore::Blob> loadBlob(const blockstore::Key &key) {
auto loaded = blobStore->load(key);
EXPECT_TRUE((bool)loaded);
return std::move(*loaded);
}
void reset(cpputils::unique_ref<blobstore::Blob> ref) {
UNUSED(ref);
//ref is moved into here and then destructed
}
2015-03-05 22:23:30 +01:00
};
2015-10-15 13:10:20 +02:00
#endif