Switch to biicode
This commit is contained in:
parent
76b3724da4
commit
0c851fa452
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
build.debug
|
||||
build.release
|
99
CMakeLists.txt
Normal file
99
CMakeLists.txt
Normal file
@ -0,0 +1,99 @@
|
||||
INCLUDE(messmer/cmake/tools)
|
||||
|
||||
# Initializes block variables
|
||||
INIT_BIICODE_BLOCK()
|
||||
|
||||
SETUP_GOOGLETEST()
|
||||
|
||||
# Actually create targets: EXEcutables and libraries.
|
||||
ADD_BIICODE_TARGETS()
|
||||
|
||||
ADD_BOOST_LOCAL(filesystem system)
|
||||
|
||||
ACTIVATE_CPP14()
|
||||
|
||||
# You can safely delete lines from here...
|
||||
|
||||
###############################################################################
|
||||
# REFERENCE #
|
||||
###############################################################################
|
||||
#
|
||||
# This CMakeLists.txt file helps defining your block building and compiling
|
||||
# To learn more about the CMake use with biicode, visit http://docs.biicode.com/c++.html
|
||||
#
|
||||
# ----------------------------------------------------
|
||||
# NEW FEATURE! Include cmake files from remote blocks:
|
||||
# -----------------------------------------------------
|
||||
# Now you can handle cmake dependencies alike you do with c/c++:
|
||||
#
|
||||
# INCLUDE(user/block/myrecipe) # include myrecipe.cmake from remote user/block
|
||||
#
|
||||
# > EXAMPLE: Include our recipes and activate C++11 in your block (http://www.biicode.com/biicode/cmake)
|
||||
#
|
||||
# INCLUDE(biicode/cmake/tools) # Include tools.cmake file from "cmake" block from the "biicode" user
|
||||
# ACTIVATE_CPP11(INTERFACE ${BII_BLOCK_TARGET})
|
||||
#
|
||||
# Remember to run "bii find" to download out cmake tools file
|
||||
#
|
||||
# ---------------------
|
||||
# INIT_BIICODE_BLOCK()
|
||||
# ---------------------
|
||||
# This function creates several helper variables as ${BII_BLOCK_NAME} and ${BII_BLOCK_USER}
|
||||
# Also it loads variables from the cmake/bii_user_block_vars.cmake
|
||||
# ${BII_LIB_SRC} File list to create the library
|
||||
# ${BII_LIB_TYPE} Empty (default, STATIC most casess) STATIC or SHARED
|
||||
# ${BII_LIB_DEPS} Dependencies to other libraries (user2_block2, user3_blockX)
|
||||
# ${BII_LIB_SYSTEM_HEADERS} System linking requirements as windows.h, pthread.h, etc
|
||||
#
|
||||
# You can use or modify them here, for example, to add or remove files from targets based on OS
|
||||
# Or use typical cmake configurations done BEFORE defining targets. Examples:
|
||||
# ADD_DEFINITIONS(-DFOO)
|
||||
# FIND_PACKAGE(OpenGL QUIET)
|
||||
# You can add INCLUDE_DIRECTORIES here too
|
||||
#
|
||||
# ---------------------
|
||||
# ADD_BIICODE_TARGETS()
|
||||
# ---------------------
|
||||
#
|
||||
# This function creates the following variables:
|
||||
# ${BII_BLOCK_TARGET} Interface (no files) target for convenient configuration of all
|
||||
# targets in this block, as the rest of targets always depend on it
|
||||
# has name in the form "user_block_interface"
|
||||
# ${BII_LIB_TARGET} Target library name, usually in the form "user_block". May not exist
|
||||
# if BII_LIB_SRC is empty
|
||||
# ${BII_BLOCK_TARGETS} List of all targets defined in this block
|
||||
# ${BII_BLOCK_EXES} List of executables targets defined in this block
|
||||
# ${BII_exe_name_TARGET}: Executable target (e.g. ${BII_main_TARGET}. You can also use
|
||||
# directly the name of the executable target (e.g. user_block_main)
|
||||
#
|
||||
# > EXAMPLE: Add include directories to all targets of this block
|
||||
#
|
||||
# TARGET_INCLUDE_DIRECTORIES(${BII_BLOCK_TARGET} INTERFACE myincludedir)
|
||||
#
|
||||
# You can add private include directories to the Lib (if existing)
|
||||
#
|
||||
# > EXAMPLE: Link with pthread:
|
||||
#
|
||||
# TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE pthread)
|
||||
# or link against library:
|
||||
# TARGET_LINK_LIBRARIES(${BII_LIB_TARGET} PUBLIC pthread)
|
||||
# or directly use the library target name:
|
||||
# TARGET_LINK_LIBRARIES(user_block PUBLIC pthread)
|
||||
#
|
||||
# NOTE: This can be also done adding pthread to ${BII_LIB_DEPS}
|
||||
# BEFORE calling ADD_BIICODE_TARGETS()
|
||||
#
|
||||
# > EXAMPLE: how to activate C++11
|
||||
#
|
||||
# IF(APPLE)
|
||||
# TARGET_COMPILE_OPTIONS(${BII_BLOCK_TARGET} INTERFACE "-std=c++11 -stdlib=libc++")
|
||||
# ELSEIF (WIN32 OR UNIX)
|
||||
# TARGET_COMPILE_OPTIONS(${BII_BLOCK_TARGET} INTERFACE "-std=c++11")
|
||||
# ENDIF(APPLE)
|
||||
#
|
||||
# > EXAMPLE: Set properties to target
|
||||
#
|
||||
# SET_TARGET_PROPERTIES(${BII_BLOCK_TARGET} PROPERTIES COMPILE_DEFINITIONS "IOV_MAX=255")
|
||||
#
|
||||
|
||||
|
48
biicode.conf
Normal file
48
biicode.conf
Normal file
@ -0,0 +1,48 @@
|
||||
# Biicode configuration file
|
||||
|
||||
[requirements]
|
||||
cryptopp/cryptopp: 8
|
||||
google/gmock: 2
|
||||
google/gtest: 10
|
||||
messmer/cmake: 1
|
||||
messmer/cpp-utils
|
||||
messmer/tempfile
|
||||
|
||||
[parent]
|
||||
# The parent version of this block. Must match folder name. E.g.
|
||||
# user/block # No version number means not published yet
|
||||
# You can change it to publish to a different track, and change version, e.g.
|
||||
# user/block(track): 7
|
||||
|
||||
[paths]
|
||||
# Local directories to look for headers (within block)
|
||||
# /
|
||||
# include
|
||||
|
||||
[dependencies]
|
||||
# Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=)
|
||||
# hello.h + hello_imp.cpp hello_imp2.cpp
|
||||
# *.h + *.cpp
|
||||
|
||||
test/main.cpp + test/*.cpp
|
||||
|
||||
[mains]
|
||||
# Manual adjust of files that define an executable
|
||||
# !main.cpp # Do not build executable from this file
|
||||
# main2.cpp # Build it (it doesnt have a main() function, but maybe it includes it)
|
||||
|
||||
[hooks]
|
||||
# These are defined equal to [dependencies],files names matching bii*stage*hook.py
|
||||
# will be launched as python scripts at stage = {post_process, clean}
|
||||
# CMakeLists.txt + bii/my_post_process1_hook.py bii_clean_hook.py
|
||||
|
||||
[includes]
|
||||
# Mapping of include patterns to external blocks
|
||||
# hello*.h: user3/depblock # includes will be processed as user3/depblock/hello*.h
|
||||
|
||||
[data]
|
||||
# Manually define data files dependencies, that will be copied to bin for execution
|
||||
# By default they are copied to bin/user/block/... which should be taken into account
|
||||
# when loading from disk such data
|
||||
# image.cpp + image.jpg # code should write open("user/block/image.jpg")
|
||||
|
@ -1,9 +1,8 @@
|
||||
#include <blockstore/implementations/inmemory/InMemoryBlock.h>
|
||||
#include <blockstore/implementations/inmemory/InMemoryBlockStore.h>
|
||||
#include <messmer/blockstore/implementations/inmemory/InMemoryBlock.h>
|
||||
#include <messmer/blockstore/implementations/inmemory/InMemoryBlockStore.h>
|
||||
#include <cstring>
|
||||
|
||||
using std::unique_ptr;
|
||||
using std::make_unique;
|
||||
using std::make_shared;
|
||||
using std::istream;
|
||||
using std::ostream;
|
@ -2,8 +2,8 @@
|
||||
#ifndef BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCK_H_
|
||||
#define BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCK_H_
|
||||
|
||||
#include <blockstore/interface/Block.h>
|
||||
#include <blockstore/utils/Data.h>
|
||||
#include <messmer/blockstore/interface/Block.h>
|
||||
#include <messmer/blockstore/utils/Data.h>
|
||||
|
||||
namespace blockstore {
|
||||
namespace inmemory {
|
@ -1,5 +1,6 @@
|
||||
#include <blockstore/implementations/inmemory/InMemoryBlock.h>
|
||||
#include <blockstore/implementations/inmemory/InMemoryBlockStore.h>
|
||||
#include <messmer/blockstore/implementations/inmemory/InMemoryBlock.h>
|
||||
#include <messmer/blockstore/implementations/inmemory/InMemoryBlockStore.h>
|
||||
#include <memory>
|
||||
|
||||
using std::unique_ptr;
|
||||
using std::make_unique;
|
@ -2,8 +2,8 @@
|
||||
#ifndef BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCKSTORE_H_
|
||||
#define BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCKSTORE_H_
|
||||
|
||||
#include <blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
#include "fspp/utils/macros.h"
|
||||
#include <messmer/blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
#include <messmer/cpp-utils/macros.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <map>
|
@ -1,4 +1,4 @@
|
||||
#include <blockstore/implementations/ondisk/FileAlreadyExistsException.h>
|
||||
#include <messmer/blockstore/implementations/ondisk/FileAlreadyExistsException.h>
|
||||
|
||||
namespace bf = boost::filesystem;
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include <blockstore/implementations/ondisk/FileAlreadyExistsException.h>
|
||||
#include <blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <blockstore/implementations/ondisk/OnDiskBlockStore.h>
|
||||
#include <blockstore/utils/FileDoesntExistException.h>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <messmer/blockstore/implementations/ondisk/FileAlreadyExistsException.h>
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlockStore.h>
|
||||
#include <messmer/blockstore/utils/FileDoesntExistException.h>
|
||||
|
||||
using std::unique_ptr;
|
||||
using std::make_unique;
|
@ -2,12 +2,12 @@
|
||||
#ifndef BLOCKSTORE_IMPLEMENTATIONS_ONDISK_ONDISKBLOCK_H_
|
||||
#define BLOCKSTORE_IMPLEMENTATIONS_ONDISK_ONDISKBLOCK_H_
|
||||
|
||||
#include <blockstore/interface/Block.h>
|
||||
#include <blockstore/utils/Data.h>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <messmer/blockstore/interface/Block.h>
|
||||
#include <messmer/blockstore/utils/Data.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "fspp/utils/macros.h"
|
||||
#include "messmer/cpp-utils/macros.h"
|
||||
|
||||
namespace blockstore {
|
||||
namespace ondisk {
|
@ -1,5 +1,5 @@
|
||||
#include <blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <blockstore/implementations/ondisk/OnDiskBlockStore.h>
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlockStore.h>
|
||||
|
||||
using std::unique_ptr;
|
||||
using std::make_unique;
|
@ -2,10 +2,10 @@
|
||||
#ifndef BLOCKSTORE_IMPLEMENTATIONS_ONDISK_ONDISKBLOCKSTORE_H_
|
||||
#define BLOCKSTORE_IMPLEMENTATIONS_ONDISK_ONDISKBLOCKSTORE_H_
|
||||
|
||||
#include <blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <messmer/blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
|
||||
#include "fspp/utils/macros.h"
|
||||
#include "messmer/cpp-utils/macros.h"
|
||||
|
||||
#include <mutex>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "FakeBlock.h"
|
||||
#include "FakeBlockStore.h"
|
||||
#include <messmer/blockstore/implementations/testfake/FakeBlock.h>
|
||||
#include <messmer/blockstore/implementations/testfake/FakeBlockStore.h>
|
||||
#include <cstring>
|
||||
|
||||
using std::unique_ptr;
|
@ -2,10 +2,10 @@
|
||||
#ifndef BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCK_H_
|
||||
#define BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCK_H_
|
||||
|
||||
#include <blockstore/interface/Block.h>
|
||||
#include <blockstore/utils/Data.h>
|
||||
#include <messmer/blockstore/interface/Block.h>
|
||||
#include "../../utils/Data.h"
|
||||
|
||||
#include "fspp/utils/macros.h"
|
||||
#include "messmer/cpp-utils/macros.h"
|
||||
|
||||
namespace blockstore {
|
||||
namespace testfake {
|
@ -1,5 +1,5 @@
|
||||
#include "FakeBlockStore.h"
|
||||
#include "FakeBlock.h"
|
||||
#include <messmer/blockstore/implementations/testfake/FakeBlock.h>
|
||||
#include <messmer/blockstore/implementations/testfake/FakeBlockStore.h>
|
||||
|
||||
using std::unique_ptr;
|
||||
using std::make_unique;
|
@ -2,9 +2,9 @@
|
||||
#ifndef BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCKSTORE_H_
|
||||
#define BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCKSTORE_H_
|
||||
|
||||
#include <blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
#include "blockstore/utils/Data.h"
|
||||
#include "fspp/utils/macros.h"
|
||||
#include <messmer/blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
#include "../../utils/Data.h"
|
||||
#include "messmer/cpp-utils/macros.h"
|
||||
|
||||
#include <mutex>
|
||||
#include <map>
|
@ -2,8 +2,8 @@
|
||||
#ifndef BLOCKSTORE_INTERFACE_BLOCK_H_
|
||||
#define BLOCKSTORE_INTERFACE_BLOCK_H_
|
||||
|
||||
#include <messmer/blockstore/utils/Key.h>
|
||||
#include <cstring>
|
||||
#include "blockstore/utils/Key.h"
|
||||
|
||||
namespace blockstore {
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ifndef FSPP_BLOCKSTORE_BLOCKSTORE_H_
|
||||
#define FSPP_BLOCKSTORE_BLOCKSTORE_H_
|
||||
|
||||
#include <blockstore/interface/Block.h>
|
||||
#include <messmer/blockstore/interface/Block.h>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
#include <messmer/blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
|
||||
using namespace blockstore;
|
||||
|
@ -2,8 +2,8 @@
|
||||
#ifndef FSPP_BLOCKSTORE_BLOCKSTOREWITHRANDOMKEYS_H_
|
||||
#define FSPP_BLOCKSTORE_BLOCKSTOREWITHRANDOMKEYS_H_
|
||||
|
||||
#include <blockstore/interface/Block.h>
|
||||
#include <blockstore/interface/BlockStore.h>
|
||||
#include <messmer/blockstore/interface/BlockStore.h>
|
||||
#include "../Block.h"
|
||||
|
||||
namespace blockstore {
|
||||
|
@ -1,3 +0,0 @@
|
||||
add_subdirectory(interface)
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(implementations)
|
@ -1,3 +0,0 @@
|
||||
add_subdirectory(ondisk)
|
||||
add_subdirectory(inmemory)
|
||||
add_subdirectory(testfake)
|
@ -1,3 +0,0 @@
|
||||
add_library(blockstore_inmemory InMemoryBlock.cpp InMemoryBlockStore.cpp)
|
||||
|
||||
target_link_libraries(blockstore_inmemory blockstore_interface blockstore_utils)
|
@ -1,3 +0,0 @@
|
||||
add_library(blockstore_ondisk OnDiskBlock.cpp OnDiskBlockStore.cpp FileAlreadyExistsException.cpp)
|
||||
|
||||
target_link_libraries(blockstore_ondisk blockstore_interface blockstore_utils boost_filesystem boost_system)
|
@ -1,3 +0,0 @@
|
||||
add_library(blockstore_testfake FakeBlock.cpp FakeBlockStore.cpp)
|
||||
|
||||
target_link_libraries(blockstore_testfake blockstore_interface blockstore_utils)
|
@ -1 +0,0 @@
|
||||
add_library(blockstore_interface helpers/BlockStoreWithRandomKeys.cpp)
|
@ -1,3 +0,0 @@
|
||||
add_library(blockstore_utils Data.cpp Key.cpp FileDoesntExistException.cpp BlockStoreUtils.cpp)
|
||||
|
||||
target_link_libraries(blockstore_utils cryptopp)
|
@ -1,8 +1,8 @@
|
||||
#include <blockstore/implementations/inmemory/InMemoryBlock.h>
|
||||
#include <blockstore/implementations/inmemory/InMemoryBlockStore.h>
|
||||
#include <test/blockstore/testutils/BlockStoreWithRandomKeysTest.h>
|
||||
#include <test/blockstore/testutils/BlockStoreTest.h>
|
||||
#include "gtest/gtest.h"
|
||||
#include <messmer/blockstore/implementations/inmemory/InMemoryBlock.h>
|
||||
#include <messmer/blockstore/implementations/inmemory/InMemoryBlockStore.h>
|
||||
#include <messmer/blockstore/test/testutils/BlockStoreTest.h>
|
||||
#include <messmer/blockstore/test/testutils/BlockStoreWithRandomKeysTest.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
|
||||
using blockstore::BlockStore;
|
@ -1,8 +1,10 @@
|
||||
#include <blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <blockstore/implementations/ondisk/OnDiskBlockStore.h>
|
||||
#include <test/blockstore/testutils/BlockStoreWithRandomKeysTest.h>
|
||||
#include <test/blockstore/testutils/BlockStoreTest.h>
|
||||
#include "gtest/gtest.h"
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlockStore.h>
|
||||
#include <messmer/blockstore/test/testutils/BlockStoreTest.h>
|
||||
#include <messmer/blockstore/test/testutils/BlockStoreWithRandomKeysTest.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
#include "messmer/tempfile/src/TempDir.h"
|
||||
|
||||
|
||||
using blockstore::BlockStore;
|
||||
@ -12,6 +14,8 @@ using blockstore::ondisk::OnDiskBlockStore;
|
||||
using std::unique_ptr;
|
||||
using std::make_unique;
|
||||
|
||||
using tempfile::TempDir;
|
||||
|
||||
class OnDiskBlockStoreTestFixture: public BlockStoreTestFixture {
|
||||
public:
|
||||
unique_ptr<BlockStore> createBlockStore() override {
|
@ -1,14 +1,17 @@
|
||||
#include <blockstore/implementations/ondisk/FileAlreadyExistsException.h>
|
||||
#include <blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include "gtest/gtest.h"
|
||||
#include <messmer/blockstore/implementations/ondisk/FileAlreadyExistsException.h>
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
#include "test/testutils/TempFile.h"
|
||||
#include "test/testutils/TempDir.h"
|
||||
#include "messmer/tempfile/src/TempFile.h"
|
||||
#include "messmer/tempfile/src/TempDir.h"
|
||||
|
||||
using ::testing::Test;
|
||||
using ::testing::WithParamInterface;
|
||||
using ::testing::Values;
|
||||
|
||||
using tempfile::TempFile;
|
||||
using tempfile::TempDir;
|
||||
|
||||
using std::unique_ptr;
|
||||
|
||||
using namespace blockstore;
|
||||
@ -60,7 +63,6 @@ public:
|
||||
INSTANTIATE_TEST_CASE_P(OnDiskBlockCreateSizeTest, OnDiskBlockCreateSizeTest, Values(0, 1, 5, 1024, 10*1024*1024));
|
||||
|
||||
TEST_P(OnDiskBlockCreateSizeTest, OnDiskSizeIsCorrect) {
|
||||
printf((std::string()+file.path().c_str()+"\n").c_str());
|
||||
Data fileContent = Data::LoadFromFile(file.path());
|
||||
EXPECT_EQ(GetParam(), fileContent.size());
|
||||
}
|
@ -1,15 +1,18 @@
|
||||
#include <blockstore/implementations/ondisk/FileAlreadyExistsException.h>
|
||||
#include <blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <test/testutils/DataBlockFixture.h>
|
||||
#include "gtest/gtest.h"
|
||||
#include <messmer/blockstore/implementations/ondisk/FileAlreadyExistsException.h>
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <messmer/blockstore/test/testutils/DataBlockFixture.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
#include "test/testutils/TempFile.h"
|
||||
#include "test/testutils/TempDir.h"
|
||||
#include "messmer/tempfile/src/TempFile.h"
|
||||
#include "messmer/tempfile/src/TempDir.h"
|
||||
|
||||
using ::testing::Test;
|
||||
using ::testing::WithParamInterface;
|
||||
using ::testing::Values;
|
||||
|
||||
using tempfile::TempFile;
|
||||
using tempfile::TempDir;
|
||||
|
||||
using std::unique_ptr;
|
||||
|
||||
using namespace blockstore;
|
@ -1,17 +1,20 @@
|
||||
#include <blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <blockstore/utils/Data.h>
|
||||
#include <blockstore/utils/FileDoesntExistException.h>
|
||||
#include <test/testutils/DataBlockFixture.h>
|
||||
#include "gtest/gtest.h"
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlock.h>
|
||||
#include <messmer/blockstore/test/testutils/DataBlockFixture.h>
|
||||
#include <messmer/blockstore/utils/FileDoesntExistException.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
#include "test/testutils/TempFile.h"
|
||||
#include "test/testutils/TempDir.h"
|
||||
#include "../../../../utils/Data.h"
|
||||
#include "messmer/tempfile/src/TempFile.h"
|
||||
#include "messmer/tempfile/src/TempDir.h"
|
||||
#include <fstream>
|
||||
|
||||
using ::testing::Test;
|
||||
using ::testing::WithParamInterface;
|
||||
using ::testing::Values;
|
||||
|
||||
using tempfile::TempFile;
|
||||
using tempfile::TempDir;
|
||||
|
||||
using std::ofstream;
|
||||
using std::unique_ptr;
|
||||
using std::ios;
|
@ -1,8 +1,8 @@
|
||||
#include <blockstore/implementations/testfake/FakeBlock.h>
|
||||
#include <blockstore/implementations/testfake/FakeBlockStore.h>
|
||||
#include <test/blockstore/testutils/BlockStoreWithRandomKeysTest.h>
|
||||
#include <test/blockstore/testutils/BlockStoreTest.h>
|
||||
#include "gtest/gtest.h"
|
||||
#include <messmer/blockstore/implementations/testfake/FakeBlock.h>
|
||||
#include <messmer/blockstore/implementations/testfake/FakeBlockStore.h>
|
||||
#include <messmer/blockstore/test/testutils/BlockStoreTest.h>
|
||||
#include <messmer/blockstore/test/testutils/BlockStoreWithRandomKeysTest.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
|
||||
using blockstore::BlockStore;
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* Tests that the header can be included without needing additional header includes as dependencies.
|
||||
*/
|
||||
#include <blockstore/interface/BlockStore.h>
|
||||
#include <messmer/blockstore/interface/BlockStore.h>
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* Tests that the header can be included without needing additional header includes as dependencies.
|
||||
*/
|
||||
#include <blockstore/interface/Block.h>
|
||||
#include <messmer/blockstore/interface/Block.h>
|
@ -1,6 +1,6 @@
|
||||
#include <blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include <messmer/blockstore/interface/helpers/BlockStoreWithRandomKeys.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
#include "google/gmock/gmock.h"
|
||||
|
||||
|
||||
using ::testing::Test;
|
6
test/main.cpp
Normal file
6
test/main.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
@ -2,9 +2,11 @@
|
||||
#ifndef TEST_BLOCKSTORE_IMPLEMENTATIONS_TESTUTILS_BLOCKSTORETEST_H_
|
||||
#define TEST_BLOCKSTORE_IMPLEMENTATIONS_TESTUTILS_BLOCKSTORETEST_H_
|
||||
|
||||
#include <blockstore/interface/BlockStore.h>
|
||||
#include <test/testutils/DataBlockFixture.h>
|
||||
#include "test/testutils/TempDir.h"
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
#include "DataBlockFixture.h"
|
||||
|
||||
#include "../../interface/BlockStore.h"
|
||||
|
||||
class BlockStoreTestFixture {
|
||||
public:
|
@ -2,11 +2,10 @@
|
||||
#ifndef TEST_BLOCKSTORE_IMPLEMENTATIONS_TESTUTILS_BLOCKSTOREWITHRANDOMKEYSTEST_H_
|
||||
#define TEST_BLOCKSTORE_IMPLEMENTATIONS_TESTUTILS_BLOCKSTOREWITHRANDOMKEYSTEST_H_
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <google/gtest/gtest.h>
|
||||
#include <messmer/blockstore/test/testutils/DataBlockFixture.h>
|
||||
|
||||
#include <blockstore/interface/BlockStore.h>
|
||||
#include <test/testutils/DataBlockFixture.h>
|
||||
#include "test/testutils/TempDir.h"
|
||||
#include "../../interface/BlockStore.h"
|
||||
|
||||
class BlockStoreWithRandomKeysTestFixture {
|
||||
public:
|
@ -1,4 +1,4 @@
|
||||
#include <test/testutils/DataBlockFixture.h>
|
||||
#include <messmer/blockstore/test/testutils/DataBlockFixture.h>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
@ -1,8 +1,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "blockstore/implementations/testfake/FakeBlockStore.h"
|
||||
#include "test/testutils/DataBlockFixture.h"
|
||||
#include "blockstore/utils/BlockStoreUtils.h"
|
||||
#include <messmer/blockstore/implementations/testfake/FakeBlockStore.h>
|
||||
#include <messmer/blockstore/test/testutils/DataBlockFixture.h>
|
||||
#include <messmer/blockstore/utils/BlockStoreUtils.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
#include <memory>
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include <blockstore/utils/Data.h>
|
||||
#include <blockstore/utils/FileDoesntExistException.h>
|
||||
#include <test/testutils/DataBlockFixture.h>
|
||||
#include "gtest/gtest.h"
|
||||
#include <messmer/blockstore/test/testutils/DataBlockFixture.h>
|
||||
#include <messmer/blockstore/utils/Data.h>
|
||||
#include <messmer/blockstore/utils/FileDoesntExistException.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
#include "test/testutils/TempFile.h"
|
||||
#include "messmer/tempfile/src/TempFile.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
@ -11,9 +11,13 @@ using ::testing::Test;
|
||||
using ::testing::WithParamInterface;
|
||||
using ::testing::Values;
|
||||
|
||||
using tempfile::TempFile;
|
||||
|
||||
using std::ifstream;
|
||||
using std::ofstream;
|
||||
|
||||
namespace bf = boost::filesystem;
|
||||
|
||||
using namespace blockstore;
|
||||
|
||||
class DataTest: public Test {
|
@ -1,8 +1,8 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include <messmer/blockstore/test/testutils/DataBlockFixture.h>
|
||||
#include <messmer/blockstore/utils/Data.h>
|
||||
#include <messmer/blockstore/utils/Key.h>
|
||||
#include "google/gtest/gtest.h"
|
||||
|
||||
#include <blockstore/utils/Key.h>
|
||||
#include "blockstore/utils/Data.h"
|
||||
#include "test/testutils/DataBlockFixture.h"
|
||||
|
||||
using ::testing::Test;
|
||||
using ::testing::WithParamInterface;
|
@ -1,6 +1,5 @@
|
||||
#include <blockstore/utils/BlockStoreUtils.h>
|
||||
#include "blockstore/interface/BlockStore.h"
|
||||
|
||||
#include <messmer/blockstore/interface/BlockStore.h>
|
||||
#include <messmer/blockstore/utils/BlockStoreUtils.h>
|
||||
#include <memory>
|
||||
|
||||
using std::unique_ptr;
|
@ -1,7 +1,5 @@
|
||||
#include <blockstore/utils/Data.h>
|
||||
#include <blockstore/utils/FileDoesntExistException.h>
|
||||
#include "FileDoesntExistException.h"
|
||||
|
||||
#include <messmer/blockstore/utils/Data.h>
|
||||
#include <messmer/blockstore/utils/FileDoesntExistException.h>
|
||||
#include <stdexcept>
|
||||
#include <fstream>
|
||||
|
@ -3,10 +3,8 @@
|
||||
#define BLOCKSTORE_IMPLEMENTATIONS_ONDISK_DATA_H_
|
||||
|
||||
#include <cstdlib>
|
||||
//TODO Move this to a more generic utils
|
||||
#include "fspp/utils/macros.h"
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <messmer/cpp-utils/macros.h>
|
||||
#include <memory>
|
||||
|
||||
namespace blockstore {
|
@ -1,4 +1,4 @@
|
||||
#include <blockstore/utils/FileDoesntExistException.h>
|
||||
#include <messmer/blockstore/utils/FileDoesntExistException.h>
|
||||
|
||||
namespace bf = boost::filesystem;
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include <blockstore/utils/Key.h>
|
||||
#include <cryptopp/cryptopp/hex.h>
|
||||
#include <cryptopp/cryptopp/osrng.h>
|
||||
#include <messmer/blockstore/utils/Key.h>
|
||||
|
||||
#include <crypto++/hex.h>
|
||||
#include <crypto++/osrng.h>
|
||||
#include <cstring>
|
||||
|
||||
using CryptoPP::ArraySource;
|
||||
using CryptoPP::ArraySink;
|
Loading…
x
Reference in New Issue
Block a user