diff --git a/src/blobstore/implementations/onblocks/BlobOnBlocks.cpp b/src/blobstore/implementations/onblocks/BlobOnBlocks.cpp index 1edeffac..174183ca 100644 --- a/src/blobstore/implementations/onblocks/BlobOnBlocks.cpp +++ b/src/blobstore/implementations/onblocks/BlobOnBlocks.cpp @@ -4,7 +4,7 @@ #include "datanodestore/DataLeafNode.h" #include "utils/Math.h" #include -#include +#include using std::function; using cpputils::unique_ref; diff --git a/src/blobstore/implementations/onblocks/BlobStoreOnBlocks.cpp b/src/blobstore/implementations/onblocks/BlobStoreOnBlocks.cpp index 795c6e5f..588a94cf 100644 --- a/src/blobstore/implementations/onblocks/BlobStoreOnBlocks.cpp +++ b/src/blobstore/implementations/onblocks/BlobStoreOnBlocks.cpp @@ -1,14 +1,14 @@ #include "parallelaccessdatatreestore/DataTreeRef.h" #include "parallelaccessdatatreestore/ParallelAccessDataTreeStore.h" -#include +#include #include "datanodestore/DataLeafNode.h" #include "datanodestore/DataNodeStore.h" #include "datatreestore/DataTreeStore.h" #include "datatreestore/DataTree.h" #include "BlobStoreOnBlocks.h" #include "BlobOnBlocks.h" -#include -#include +#include +#include using cpputils::unique_ref; using cpputils::make_unique_ref; diff --git a/src/blobstore/implementations/onblocks/BlobStoreOnBlocks.h b/src/blobstore/implementations/onblocks/BlobStoreOnBlocks.h index cbb3651a..0dcea458 100644 --- a/src/blobstore/implementations/onblocks/BlobStoreOnBlocks.h +++ b/src/blobstore/implementations/onblocks/BlobStoreOnBlocks.h @@ -3,7 +3,7 @@ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_BLOCKED_BLOBSTOREONBLOCKS_H_ #include "../../interface/BlobStore.h" -#include "messmer/blockstore/interface/BlockStore.h" +#include namespace blobstore { namespace onblocks { diff --git a/src/blobstore/implementations/onblocks/datanodestore/DataInnerNode.cpp b/src/blobstore/implementations/onblocks/datanodestore/DataInnerNode.cpp index c2004912..dda86ece 100644 --- a/src/blobstore/implementations/onblocks/datanodestore/DataInnerNode.cpp +++ b/src/blobstore/implementations/onblocks/datanodestore/DataInnerNode.cpp @@ -1,6 +1,6 @@ #include "DataInnerNode.h" #include "DataNodeStore.h" -#include +#include using blockstore::Block; using cpputils::Data; diff --git a/src/blobstore/implementations/onblocks/datanodestore/DataInnerNode_ChildEntry.h b/src/blobstore/implementations/onblocks/datanodestore/DataInnerNode_ChildEntry.h index 33813657..51e7afc1 100644 --- a/src/blobstore/implementations/onblocks/datanodestore/DataInnerNode_ChildEntry.h +++ b/src/blobstore/implementations/onblocks/datanodestore/DataInnerNode_ChildEntry.h @@ -2,7 +2,7 @@ #ifndef MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATANODESTORE_DATAINNERNODE_CHILDENTRY_H_ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATANODESTORE_DATAINNERNODE_CHILDENTRY_H_ -#include +#include namespace blobstore{ namespace onblocks{ diff --git a/src/blobstore/implementations/onblocks/datanodestore/DataLeafNode.cpp b/src/blobstore/implementations/onblocks/datanodestore/DataLeafNode.cpp index 723cdb72..7e3511ea 100644 --- a/src/blobstore/implementations/onblocks/datanodestore/DataLeafNode.cpp +++ b/src/blobstore/implementations/onblocks/datanodestore/DataLeafNode.cpp @@ -1,6 +1,6 @@ #include "DataLeafNode.h" #include "DataInnerNode.h" -#include +#include using blockstore::Block; using cpputils::Data; diff --git a/src/blobstore/implementations/onblocks/datanodestore/DataNode.cpp b/src/blobstore/implementations/onblocks/datanodestore/DataNode.cpp index 2d093963..3b409e4f 100644 --- a/src/blobstore/implementations/onblocks/datanodestore/DataNode.cpp +++ b/src/blobstore/implementations/onblocks/datanodestore/DataNode.cpp @@ -2,7 +2,7 @@ #include "DataLeafNode.h" #include "DataNode.h" #include "DataNodeStore.h" -#include +#include using blockstore::Block; using blockstore::Key; diff --git a/src/blobstore/implementations/onblocks/datanodestore/DataNode.h b/src/blobstore/implementations/onblocks/datanodestore/DataNode.h index 960f54a5..e37c5415 100644 --- a/src/blobstore/implementations/onblocks/datanodestore/DataNode.h +++ b/src/blobstore/implementations/onblocks/datanodestore/DataNode.h @@ -3,7 +3,7 @@ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATANODESTORE_DATANODE_H_ #include "DataNodeView.h" -#include +#include namespace blobstore { namespace onblocks { diff --git a/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.cpp b/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.cpp index b70e8081..6849ead3 100644 --- a/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.cpp +++ b/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.cpp @@ -1,10 +1,10 @@ #include "DataInnerNode.h" #include "DataLeafNode.h" #include "DataNodeStore.h" -#include "messmer/blockstore/interface/BlockStore.h" -#include "messmer/blockstore/interface/Block.h" -#include "messmer/blockstore/utils/BlockStoreUtils.h" -#include +#include +#include +#include +#include using blockstore::BlockStore; using blockstore::Block; diff --git a/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.h b/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.h index 6c267c90..dc2bac44 100644 --- a/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.h +++ b/src/blobstore/implementations/onblocks/datanodestore/DataNodeStore.h @@ -3,9 +3,9 @@ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATANODESTORE_DATANODESTORE_H_ #include -#include "messmer/cpp-utils/macros.h" +#include #include "DataNodeView.h" -#include +#include namespace blockstore{ class Block; diff --git a/src/blobstore/implementations/onblocks/datanodestore/DataNodeView.h b/src/blobstore/implementations/onblocks/datanodestore/DataNodeView.h index b5429f89..7dfcb1c4 100644 --- a/src/blobstore/implementations/onblocks/datanodestore/DataNodeView.h +++ b/src/blobstore/implementations/onblocks/datanodestore/DataNodeView.h @@ -2,11 +2,11 @@ #ifndef MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATANODESTORE_DATANODEVIEW_H_ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATANODESTORE_DATANODEVIEW_H_ -#include "messmer/blockstore/interface/Block.h" +#include #include "../BlobStoreOnBlocks.h" #include "DataInnerNode_ChildEntry.h" -#include +#include #include #include diff --git a/src/blobstore/implementations/onblocks/datatreestore/DataTree.cpp b/src/blobstore/implementations/onblocks/datatreestore/DataTree.cpp index ee37a663..d2d87049 100644 --- a/src/blobstore/implementations/onblocks/datatreestore/DataTree.cpp +++ b/src/blobstore/implementations/onblocks/datatreestore/DataTree.cpp @@ -7,10 +7,10 @@ #include "impl/algorithms.h" -#include "messmer/cpp-utils/pointer/cast.h" -#include "messmer/cpp-utils/pointer/optional_ownership_ptr.h" +#include +#include #include -#include +#include using blockstore::Key; using blobstore::onblocks::datanodestore::DataNodeStore; diff --git a/src/blobstore/implementations/onblocks/datatreestore/DataTree.h b/src/blobstore/implementations/onblocks/datatreestore/DataTree.h index badde8b4..ae7e6c43 100644 --- a/src/blobstore/implementations/onblocks/datatreestore/DataTree.h +++ b/src/blobstore/implementations/onblocks/datatreestore/DataTree.h @@ -3,12 +3,12 @@ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATATREE_H_ #include -#include -#include +#include +#include #include "../datanodestore/DataNodeView.h" //TODO Replace with C++14 once std::shared_mutex is supported #include -#include +#include namespace blobstore { namespace onblocks { diff --git a/src/blobstore/implementations/onblocks/datatreestore/DataTreeStore.h b/src/blobstore/implementations/onblocks/datatreestore/DataTreeStore.h index 1ed023a4..1697eab8 100644 --- a/src/blobstore/implementations/onblocks/datatreestore/DataTreeStore.h +++ b/src/blobstore/implementations/onblocks/datatreestore/DataTreeStore.h @@ -3,9 +3,9 @@ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_DATATREESTORE_H_ #include -#include -#include -#include +#include +#include +#include #include namespace blobstore { diff --git a/src/blobstore/implementations/onblocks/datatreestore/impl/algorithms.cpp b/src/blobstore/implementations/onblocks/datatreestore/impl/algorithms.cpp index 89d64903..6f232700 100644 --- a/src/blobstore/implementations/onblocks/datatreestore/impl/algorithms.cpp +++ b/src/blobstore/implementations/onblocks/datatreestore/impl/algorithms.cpp @@ -1,10 +1,10 @@ #include "algorithms.h" -#include -#include +#include +#include #include "../../datanodestore/DataInnerNode.h" #include "../../datanodestore/DataNodeStore.h" -#include +#include using std::function; using cpputils::optional_ownership_ptr; diff --git a/src/blobstore/implementations/onblocks/datatreestore/impl/algorithms.h b/src/blobstore/implementations/onblocks/datatreestore/impl/algorithms.h index 46d6c7ca..a04168a8 100644 --- a/src/blobstore/implementations/onblocks/datatreestore/impl/algorithms.h +++ b/src/blobstore/implementations/onblocks/datatreestore/impl/algorithms.h @@ -2,7 +2,7 @@ #ifndef MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_IMPL_ALGORITHMS_H_ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_IMPL_ALGORITHMS_H_ -#include +#include namespace blobstore { namespace onblocks { diff --git a/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/DataTreeRef.h b/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/DataTreeRef.h index 719fde46..b379c91a 100644 --- a/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/DataTreeRef.h +++ b/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/DataTreeRef.h @@ -2,7 +2,7 @@ #ifndef MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_PARALLELACCESSDATATREESTORE_DATATREEREF_H_ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_PARALLELACCESSDATATREESTORE_DATATREEREF_H_ -#include +#include #include "../datatreestore/DataTree.h" namespace blobstore { diff --git a/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/ParallelAccessDataTreeStore.h b/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/ParallelAccessDataTreeStore.h index 61de0285..c0499a43 100644 --- a/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/ParallelAccessDataTreeStore.h +++ b/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/ParallelAccessDataTreeStore.h @@ -3,9 +3,9 @@ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_PARALLELACCESSDATATREESTORE_PARALLELACCESSDATATREESTORE_H_ #include -#include -#include -#include +#include +#include +#include namespace blobstore { namespace onblocks { diff --git a/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/ParallelAccessDataTreeStoreAdapter.h b/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/ParallelAccessDataTreeStoreAdapter.h index cdb3dc67..6e8b1861 100644 --- a/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/ParallelAccessDataTreeStoreAdapter.h +++ b/src/blobstore/implementations/onblocks/parallelaccessdatatreestore/ParallelAccessDataTreeStoreAdapter.h @@ -2,8 +2,8 @@ #ifndef MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_PARALLELACCESSDATATREESTORE_PARALLELACCESSDATATREESTOREADAPTER_H_ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_PARALLELACCESSDATATREESTORE_PARALLELACCESSDATATREESTOREADAPTER_H_ -#include -#include +#include +#include #include "../datatreestore/DataTreeStore.h" #include "../datatreestore/DataTree.h" diff --git a/src/blobstore/interface/Blob.h b/src/blobstore/interface/Blob.h index fcc96da5..972461dc 100644 --- a/src/blobstore/interface/Blob.h +++ b/src/blobstore/interface/Blob.h @@ -4,8 +4,8 @@ #include #include -#include -#include +#include +#include namespace blobstore { diff --git a/src/blobstore/interface/BlobStore.h b/src/blobstore/interface/BlobStore.h index 9bada9ab..ad8b0822 100644 --- a/src/blobstore/interface/BlobStore.h +++ b/src/blobstore/interface/BlobStore.h @@ -6,8 +6,8 @@ #include #include -#include "messmer/blockstore/utils/Key.h" -#include +#include +#include namespace blobstore { diff --git a/src/blockstore/CMakeLists.txt b/src/blockstore/CMakeLists.txt index d3245a51..e435b4cd 100644 --- a/src/blockstore/CMakeLists.txt +++ b/src/blockstore/CMakeLists.txt @@ -35,6 +35,7 @@ add_library(${PROJECT_NAME} STATIC ${SOURCES}) if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") target_link_libraries(${PROJECT_NAME} PRIVATE rt) endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils) target_add_boost(${PROJECT_NAME} filesystem system thread) diff --git a/src/blockstore/implementations/caching/CachedBlock.h b/src/blockstore/implementations/caching/CachedBlock.h index bcad16c6..81f1b640 100644 --- a/src/blockstore/implementations/caching/CachedBlock.h +++ b/src/blockstore/implementations/caching/CachedBlock.h @@ -4,7 +4,7 @@ #include "../../interface/Block.h" -#include +#include namespace blockstore { namespace caching { diff --git a/src/blockstore/implementations/caching/CachingBlockStore.cpp b/src/blockstore/implementations/caching/CachingBlockStore.cpp index 055796d4..b9afd151 100644 --- a/src/blockstore/implementations/caching/CachingBlockStore.cpp +++ b/src/blockstore/implementations/caching/CachingBlockStore.cpp @@ -4,8 +4,8 @@ #include "../../interface/Block.h" #include -#include -#include +#include +#include using cpputils::dynamic_pointer_move; using cpputils::Data; diff --git a/src/blockstore/implementations/caching/NewBlock.cpp b/src/blockstore/implementations/caching/NewBlock.cpp index 18bf8425..8e051935 100644 --- a/src/blockstore/implementations/caching/NewBlock.cpp +++ b/src/blockstore/implementations/caching/NewBlock.cpp @@ -1,7 +1,7 @@ #include "NewBlock.h" #include "CachingBlockStore.h" -#include -#include +#include +#include using cpputils::Data; using boost::none; diff --git a/src/blockstore/implementations/caching/NewBlock.h b/src/blockstore/implementations/caching/NewBlock.h index 84929204..bdaa5172 100644 --- a/src/blockstore/implementations/caching/NewBlock.h +++ b/src/blockstore/implementations/caching/NewBlock.h @@ -3,9 +3,9 @@ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_CACHING_NEWBLOCK_H_ #include "../../interface/BlockStore.h" -#include +#include -#include "messmer/cpp-utils/macros.h" +#include #include namespace blockstore { diff --git a/src/blockstore/implementations/caching/cache/Cache.h b/src/blockstore/implementations/caching/cache/Cache.h index b20c34d9..5b817d3c 100644 --- a/src/blockstore/implementations/caching/cache/Cache.h +++ b/src/blockstore/implementations/caching/cache/Cache.h @@ -8,9 +8,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include namespace blockstore { namespace caching { diff --git a/src/blockstore/implementations/caching/cache/CacheEntry.h b/src/blockstore/implementations/caching/cache/CacheEntry.h index 56d77cdb..14b916e2 100644 --- a/src/blockstore/implementations/caching/cache/CacheEntry.h +++ b/src/blockstore/implementations/caching/cache/CacheEntry.h @@ -4,7 +4,7 @@ #include #include -#include +#include #include namespace blockstore { diff --git a/src/blockstore/implementations/caching/cache/PeriodicTask.cpp b/src/blockstore/implementations/caching/cache/PeriodicTask.cpp index 14af6d5e..3e8f634b 100644 --- a/src/blockstore/implementations/caching/cache/PeriodicTask.cpp +++ b/src/blockstore/implementations/caching/cache/PeriodicTask.cpp @@ -1,5 +1,5 @@ #include "PeriodicTask.h" -#include +#include using std::function; using std::endl; diff --git a/src/blockstore/implementations/caching/cache/PeriodicTask.h b/src/blockstore/implementations/caching/cache/PeriodicTask.h index 3a8fd8a2..7663e293 100644 --- a/src/blockstore/implementations/caching/cache/PeriodicTask.h +++ b/src/blockstore/implementations/caching/cache/PeriodicTask.h @@ -3,7 +3,7 @@ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_CACHING_CACHE_PERIODICTASK_H_ #include -#include +#include #include namespace blockstore { diff --git a/src/blockstore/implementations/caching/cache/QueueMap.h b/src/blockstore/implementations/caching/cache/QueueMap.h index 43f4b1ee..8db9d646 100644 --- a/src/blockstore/implementations/caching/cache/QueueMap.h +++ b/src/blockstore/implementations/caching/cache/QueueMap.h @@ -6,8 +6,8 @@ #include #include #include -#include -#include +#include +#include namespace blockstore { namespace caching { diff --git a/src/blockstore/implementations/compressing/CompressedBlock.h b/src/blockstore/implementations/compressing/CompressedBlock.h index cf7b2301..35f07340 100644 --- a/src/blockstore/implementations/compressing/CompressedBlock.h +++ b/src/blockstore/implementations/compressing/CompressedBlock.h @@ -4,8 +4,8 @@ #include "../../interface/Block.h" #include "../../interface/BlockStore.h" -#include -#include +#include +#include #include namespace blockstore { diff --git a/src/blockstore/implementations/compressing/compressors/Gzip.cpp b/src/blockstore/implementations/compressing/compressors/Gzip.cpp index 4c2d59da..3a8f5705 100644 --- a/src/blockstore/implementations/compressing/compressors/Gzip.cpp +++ b/src/blockstore/implementations/compressing/compressors/Gzip.cpp @@ -1,5 +1,5 @@ #include "Gzip.h" -#include +#include using cpputils::Data; diff --git a/src/blockstore/implementations/compressing/compressors/Gzip.h b/src/blockstore/implementations/compressing/compressors/Gzip.h index ab53e372..12ac23ac 100644 --- a/src/blockstore/implementations/compressing/compressors/Gzip.h +++ b/src/blockstore/implementations/compressing/compressors/Gzip.h @@ -2,7 +2,7 @@ #ifndef MESSMER_BLOCKSTORE_IMPLEMENTATIONS_COMPRESSING_COMPRESSORS_GZIP_H #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_COMPRESSING_COMPRESSORS_GZIP_H -#include +#include namespace blockstore { namespace compressing { diff --git a/src/blockstore/implementations/compressing/compressors/RunLengthEncoding.cpp b/src/blockstore/implementations/compressing/compressors/RunLengthEncoding.cpp index 24e0501e..3a20d759 100644 --- a/src/blockstore/implementations/compressing/compressors/RunLengthEncoding.cpp +++ b/src/blockstore/implementations/compressing/compressors/RunLengthEncoding.cpp @@ -1,6 +1,6 @@ #include "RunLengthEncoding.h" #include -#include +#include using cpputils::Data; using std::string; diff --git a/src/blockstore/implementations/compressing/compressors/RunLengthEncoding.h b/src/blockstore/implementations/compressing/compressors/RunLengthEncoding.h index 29a2c739..2342f61e 100644 --- a/src/blockstore/implementations/compressing/compressors/RunLengthEncoding.h +++ b/src/blockstore/implementations/compressing/compressors/RunLengthEncoding.h @@ -2,7 +2,7 @@ #ifndef MESSMER_BLOCKSTORE_IMPLEMENTATIONS_COMPRESSING_COMPRESSORS_RUNLENGTHENCODING_H #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_COMPRESSING_COMPRESSORS_RUNLENGTHENCODING_H -#include +#include namespace blockstore { namespace compressing { diff --git a/src/blockstore/implementations/encrypted/EncryptedBlock.h b/src/blockstore/implementations/encrypted/EncryptedBlock.h index 5fbe8c2c..1cb40110 100644 --- a/src/blockstore/implementations/encrypted/EncryptedBlock.h +++ b/src/blockstore/implementations/encrypted/EncryptedBlock.h @@ -3,18 +3,18 @@ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_ENCRYPTED_ENCRYPTEDBLOCK_H_ #include "../../interface/Block.h" -#include +#include #include "../../interface/BlockStore.h" -#include "messmer/cpp-utils/macros.h" +#include #include #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include namespace blockstore { namespace encrypted { diff --git a/src/blockstore/implementations/encrypted/EncryptedBlockStore.h b/src/blockstore/implementations/encrypted/EncryptedBlockStore.h index 2f65be01..30943521 100644 --- a/src/blockstore/implementations/encrypted/EncryptedBlockStore.h +++ b/src/blockstore/implementations/encrypted/EncryptedBlockStore.h @@ -3,8 +3,8 @@ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_ENCRYPTED_ENCRYPTEDBLOCKSTORE_H_ #include "../../interface/BlockStore.h" -#include -#include +#include +#include #include "EncryptedBlock.h" #include diff --git a/src/blockstore/implementations/inmemory/InMemoryBlock.cpp b/src/blockstore/implementations/inmemory/InMemoryBlock.cpp index 48bd394f..6ebd50fa 100644 --- a/src/blockstore/implementations/inmemory/InMemoryBlock.cpp +++ b/src/blockstore/implementations/inmemory/InMemoryBlock.cpp @@ -1,8 +1,8 @@ #include "InMemoryBlock.h" #include "InMemoryBlockStore.h" #include -#include -#include +#include +#include using std::make_shared; using std::istream; diff --git a/src/blockstore/implementations/inmemory/InMemoryBlock.h b/src/blockstore/implementations/inmemory/InMemoryBlock.h index f85af9a8..3f688637 100644 --- a/src/blockstore/implementations/inmemory/InMemoryBlock.h +++ b/src/blockstore/implementations/inmemory/InMemoryBlock.h @@ -3,7 +3,7 @@ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCK_H_ #include "../../interface/Block.h" -#include +#include namespace blockstore { namespace inmemory { diff --git a/src/blockstore/implementations/inmemory/InMemoryBlockStore.cpp b/src/blockstore/implementations/inmemory/InMemoryBlockStore.cpp index 6a97dd7b..17124fea 100644 --- a/src/blockstore/implementations/inmemory/InMemoryBlockStore.cpp +++ b/src/blockstore/implementations/inmemory/InMemoryBlockStore.cpp @@ -1,7 +1,7 @@ #include "InMemoryBlock.h" #include "InMemoryBlockStore.h" #include -#include +#include using std::make_unique; using std::string; diff --git a/src/blockstore/implementations/inmemory/InMemoryBlockStore.h b/src/blockstore/implementations/inmemory/InMemoryBlockStore.h index 2fcb5861..6fbfe7ae 100644 --- a/src/blockstore/implementations/inmemory/InMemoryBlockStore.h +++ b/src/blockstore/implementations/inmemory/InMemoryBlockStore.h @@ -3,7 +3,7 @@ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCKSTORE_H_ #include "../../interface/helpers/BlockStoreWithRandomKeys.h" -#include +#include #include #include diff --git a/src/blockstore/implementations/ondisk/OnDiskBlock.cpp b/src/blockstore/implementations/ondisk/OnDiskBlock.cpp index 0458df66..ffb789bb 100644 --- a/src/blockstore/implementations/ondisk/OnDiskBlock.cpp +++ b/src/blockstore/implementations/ondisk/OnDiskBlock.cpp @@ -4,8 +4,8 @@ #include "OnDiskBlock.h" #include "OnDiskBlockStore.h" #include "../../utils/FileDoesntExistException.h" -#include -#include +#include +#include using std::istream; using std::ostream; diff --git a/src/blockstore/implementations/ondisk/OnDiskBlock.h b/src/blockstore/implementations/ondisk/OnDiskBlock.h index f17e4d33..03f958dc 100644 --- a/src/blockstore/implementations/ondisk/OnDiskBlock.h +++ b/src/blockstore/implementations/ondisk/OnDiskBlock.h @@ -4,10 +4,10 @@ #include #include "../../interface/Block.h" -#include +#include #include -#include +#include #include namespace blockstore { diff --git a/src/blockstore/implementations/ondisk/OnDiskBlockStore.h b/src/blockstore/implementations/ondisk/OnDiskBlockStore.h index 0de6df83..59bf449d 100644 --- a/src/blockstore/implementations/ondisk/OnDiskBlockStore.h +++ b/src/blockstore/implementations/ondisk/OnDiskBlockStore.h @@ -5,7 +5,7 @@ #include #include "../../interface/helpers/BlockStoreWithRandomKeys.h" -#include "messmer/cpp-utils/macros.h" +#include namespace blockstore { namespace ondisk { diff --git a/src/blockstore/implementations/parallelaccess/BlockRef.h b/src/blockstore/implementations/parallelaccess/BlockRef.h index 0aa070e5..a4f742bb 100644 --- a/src/blockstore/implementations/parallelaccess/BlockRef.h +++ b/src/blockstore/implementations/parallelaccess/BlockRef.h @@ -2,9 +2,9 @@ #ifndef MESSMER_BLOCKSTORE_IMPLEMENTATIONS_PARALLELACCESS_BLOCKREF_H_ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_PARALLELACCESS_BLOCKREF_H_ -#include +#include #include "../../interface/Block.h" -#include "messmer/cpp-utils/macros.h" +#include #include namespace blockstore { diff --git a/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStore.cpp b/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStore.cpp index 23c20ea8..308352c0 100644 --- a/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStore.cpp +++ b/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStore.cpp @@ -2,8 +2,8 @@ #include "ParallelAccessBlockStore.h" #include "ParallelAccessBlockStoreAdapter.h" #include -#include -#include +#include +#include using std::string; using std::promise; diff --git a/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStore.h b/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStore.h index ad1c03a0..b87bd57a 100644 --- a/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStore.h +++ b/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStore.h @@ -2,10 +2,10 @@ #ifndef MESSMER_BLOCKSTORE_IMPLEMENTATIONS_PARALLELACCESS_PARALLELACCESSBLOCKSTORE_H_ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_PARALLELACCESS_PARALLELACCESSBLOCKSTORE_H_ -#include +#include #include "BlockRef.h" #include "../../interface/BlockStore.h" -#include +#include namespace blockstore { namespace parallelaccess { diff --git a/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStoreAdapter.h b/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStoreAdapter.h index ed11256e..679b30d5 100644 --- a/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStoreAdapter.h +++ b/src/blockstore/implementations/parallelaccess/ParallelAccessBlockStoreAdapter.h @@ -2,8 +2,8 @@ #ifndef MESSMER_BLOCKSTORE_IMPLEMENTATIONS_PARALLELACCESS_PARALLELACCESSBLOCKSTOREADAPTER_H_ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_PARALLELACCESS_PARALLELACCESSBLOCKSTOREADAPTER_H_ -#include -#include +#include +#include #include "../../interface/BlockStore.h" namespace blockstore { diff --git a/src/blockstore/implementations/testfake/FakeBlock.cpp b/src/blockstore/implementations/testfake/FakeBlock.cpp index 098c0ca1..8ce97fe3 100644 --- a/src/blockstore/implementations/testfake/FakeBlock.cpp +++ b/src/blockstore/implementations/testfake/FakeBlock.cpp @@ -1,8 +1,8 @@ #include "FakeBlock.h" #include "FakeBlockStore.h" #include -#include -#include +#include +#include using std::shared_ptr; using std::istream; diff --git a/src/blockstore/implementations/testfake/FakeBlock.h b/src/blockstore/implementations/testfake/FakeBlock.h index 325d5bf7..e025d3e5 100644 --- a/src/blockstore/implementations/testfake/FakeBlock.h +++ b/src/blockstore/implementations/testfake/FakeBlock.h @@ -3,9 +3,9 @@ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_TESTFAKE_FAKEBLOCK_H_ #include "../../interface/Block.h" -#include +#include -#include "messmer/cpp-utils/macros.h" +#include namespace blockstore { namespace testfake { diff --git a/src/blockstore/implementations/testfake/FakeBlockStore.cpp b/src/blockstore/implementations/testfake/FakeBlockStore.cpp index 1b85a760..2a0ddfc7 100644 --- a/src/blockstore/implementations/testfake/FakeBlockStore.cpp +++ b/src/blockstore/implementations/testfake/FakeBlockStore.cpp @@ -1,6 +1,6 @@ #include "FakeBlock.h" #include "FakeBlockStore.h" -#include +#include using std::make_shared; using std::string; diff --git a/src/blockstore/implementations/testfake/FakeBlockStore.h b/src/blockstore/implementations/testfake/FakeBlockStore.h index 5fd80502..38d9da7e 100644 --- a/src/blockstore/implementations/testfake/FakeBlockStore.h +++ b/src/blockstore/implementations/testfake/FakeBlockStore.h @@ -3,8 +3,8 @@ #define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_TESTFAKE_FAKEBLOCKSTORE_H_ #include "../../interface/helpers/BlockStoreWithRandomKeys.h" -#include -#include "messmer/cpp-utils/macros.h" +#include +#include #include #include diff --git a/src/blockstore/interface/BlockStore.h b/src/blockstore/interface/BlockStore.h index 3af2f3ce..4130d4d7 100644 --- a/src/blockstore/interface/BlockStore.h +++ b/src/blockstore/interface/BlockStore.h @@ -5,8 +5,8 @@ #include "Block.h" #include #include -#include -#include +#include +#include namespace blockstore { diff --git a/src/blockstore/interface/helpers/BlockStoreWithRandomKeys.h b/src/blockstore/interface/helpers/BlockStoreWithRandomKeys.h index 9230cabd..3a9cad8d 100644 --- a/src/blockstore/interface/helpers/BlockStoreWithRandomKeys.h +++ b/src/blockstore/interface/helpers/BlockStoreWithRandomKeys.h @@ -4,7 +4,7 @@ #include "../BlockStore.h" #include "../Block.h" -#include +#include namespace blockstore { diff --git a/src/blockstore/utils/BlockStoreUtils.cpp b/src/blockstore/utils/BlockStoreUtils.cpp index a304c91e..77cafc02 100644 --- a/src/blockstore/utils/BlockStoreUtils.cpp +++ b/src/blockstore/utils/BlockStoreUtils.cpp @@ -1,8 +1,8 @@ #include "../interface/BlockStore.h" #include "BlockStoreUtils.h" -#include +#include #include -#include +#include using cpputils::Data; using cpputils::unique_ref; diff --git a/src/blockstore/utils/BlockStoreUtils.h b/src/blockstore/utils/BlockStoreUtils.h index f479ed01..0e7b6328 100644 --- a/src/blockstore/utils/BlockStoreUtils.h +++ b/src/blockstore/utils/BlockStoreUtils.h @@ -2,7 +2,7 @@ #ifndef MESSMER_BLOCKSTORE_UTILS_BLOCKSTOREUTILS_H_ #define MESSMER_BLOCKSTORE_UTILS_BLOCKSTOREUTILS_H_ -#include +#include namespace blockstore { class BlockStore; diff --git a/src/blockstore/utils/Key.h b/src/blockstore/utils/Key.h index c395d2ec..ae9286ba 100644 --- a/src/blockstore/utils/Key.h +++ b/src/blockstore/utils/Key.h @@ -3,7 +3,7 @@ #define MESSMER_BLOCKSTORE_UTILS_KEY_H_ #include -#include +#include namespace blockstore { diff --git a/src/cpp-utils/CMakeLists.txt b/src/cpp-utils/CMakeLists.txt index f03ab131..ab6a513e 100644 --- a/src/cpp-utils/CMakeLists.txt +++ b/src/cpp-utils/CMakeLists.txt @@ -40,7 +40,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") target_link_libraries(${PROJECT_NAME} PRIVATE rt) endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") -target_link_libraries(${PROJECT_NAME} PRIVATE curl) +target_link_libraries(${PROJECT_NAME} PRIVATE pthread curl) # TODO From Crypto++ 5.7 on, it should support cmake with find_package(). find_library(CryptoPP cryptopp) diff --git a/test/blobstore/implementations/onblocks/BigBlobsTest.cpp b/test/blobstore/implementations/onblocks/BigBlobsTest.cpp index 49b60eca..2a04b364 100644 --- a/test/blobstore/implementations/onblocks/BigBlobsTest.cpp +++ b/test/blobstore/implementations/onblocks/BigBlobsTest.cpp @@ -1,12 +1,12 @@ #include -#include -#include -#include -#include -#include -#include -#include "../../../implementations/onblocks/BlobStoreOnBlocks.h" -#include "../../../implementations/onblocks/BlobOnBlocks.h" +#include +#include +#include +#include +#include +#include +#include "blobstore/implementations/onblocks/BlobStoreOnBlocks.h" +#include "blobstore/implementations/onblocks/BlobOnBlocks.h" using namespace blobstore; using namespace blobstore::onblocks; diff --git a/test/blobstore/implementations/onblocks/BlobReadWriteTest.cpp b/test/blobstore/implementations/onblocks/BlobReadWriteTest.cpp index 85e3a924..e6459acb 100644 --- a/test/blobstore/implementations/onblocks/BlobReadWriteTest.cpp +++ b/test/blobstore/implementations/onblocks/BlobReadWriteTest.cpp @@ -1,7 +1,7 @@ #include "testutils/BlobStoreTest.h" -#include -#include -#include "../../../implementations/onblocks/datanodestore/DataNodeView.h" +#include +#include +#include "blobstore/implementations/onblocks/datanodestore/DataNodeView.h" using cpputils::unique_ref; using ::testing::WithParamInterface; @@ -60,7 +60,7 @@ TEST_F(BlobReadWriteTest, WritingImmediatelyFlushes_LargeSize) { TEST_F(BlobReadWriteTest, WritingCloseTo16ByteLimitDoesntDestroySize) { blob->resize(1); blob->write(randomData.data(), 32776, 4); - EXPECT_EQ(32780, blob->size()); + EXPECT_EQ(32780u, blob->size()); } struct DataRange { diff --git a/test/blobstore/implementations/onblocks/BlobSizeTest.cpp b/test/blobstore/implementations/onblocks/BlobSizeTest.cpp index a972f551..a334afd5 100644 --- a/test/blobstore/implementations/onblocks/BlobSizeTest.cpp +++ b/test/blobstore/implementations/onblocks/BlobSizeTest.cpp @@ -1,6 +1,6 @@ #include "testutils/BlobStoreTest.h" -#include -#include +#include +#include using namespace blobstore; using blockstore::Key; @@ -21,12 +21,12 @@ constexpr uint32_t BlobSizeTest::MEDIUM_SIZE; constexpr uint32_t BlobSizeTest::LARGE_SIZE; TEST_F(BlobSizeTest, CreatedBlobIsEmpty) { - EXPECT_EQ(0, blob->size()); + EXPECT_EQ(0u, blob->size()); } TEST_F(BlobSizeTest, Growing_1Byte) { blob->resize(1); - EXPECT_EQ(1, blob->size()); + EXPECT_EQ(1u, blob->size()); } TEST_F(BlobSizeTest, Growing_Large) { @@ -37,24 +37,24 @@ TEST_F(BlobSizeTest, Growing_Large) { TEST_F(BlobSizeTest, Shrinking_Empty) { blob->resize(LARGE_SIZE); blob->resize(0); - EXPECT_EQ(0, blob->size()); + EXPECT_EQ(0u, blob->size()); } TEST_F(BlobSizeTest, Shrinking_1Byte) { blob->resize(LARGE_SIZE); blob->resize(1); - EXPECT_EQ(1, blob->size()); + EXPECT_EQ(1u, blob->size()); } TEST_F(BlobSizeTest, ResizingToItself_Empty) { blob->resize(0); - EXPECT_EQ(0, blob->size()); + EXPECT_EQ(0u, blob->size()); } TEST_F(BlobSizeTest, ResizingToItself_1Byte) { blob->resize(1); blob->resize(1); - EXPECT_EQ(1, blob->size()); + EXPECT_EQ(1u, blob->size()); } TEST_F(BlobSizeTest, ResizingToItself_Large) { @@ -67,7 +67,7 @@ TEST_F(BlobSizeTest, EmptyBlobStaysEmptyWhenLoading) { Key key = blob->key(); reset(std::move(blob)); auto loaded = loadBlob(key); - EXPECT_EQ(0, loaded->size()); + EXPECT_EQ(0u, loaded->size()); } TEST_F(BlobSizeTest, BlobSizeStaysIntactWhenLoading) { @@ -81,34 +81,34 @@ TEST_F(BlobSizeTest, BlobSizeStaysIntactWhenLoading) { TEST_F(BlobSizeTest, WritingAtEndOfBlobGrowsBlob_Empty) { int value; blob->write(&value, 0, 4); - EXPECT_EQ(4, blob->size()); + EXPECT_EQ(4u, blob->size()); } TEST_F(BlobSizeTest, WritingAfterEndOfBlobGrowsBlob_Empty) { int value; blob->write(&value, 2, 4); - EXPECT_EQ(6, blob->size()); + EXPECT_EQ(6u, blob->size()); } TEST_F(BlobSizeTest, WritingOverEndOfBlobGrowsBlob_NonEmpty) { blob->resize(1); int value; blob->write(&value, 0, 4); - EXPECT_EQ(4, blob->size()); + EXPECT_EQ(4u, blob->size()); } TEST_F(BlobSizeTest, WritingAtEndOfBlobGrowsBlob_NonEmpty) { blob->resize(1); int value; blob->write(&value, 1, 4); - EXPECT_EQ(5, blob->size()); + EXPECT_EQ(5u, blob->size()); } TEST_F(BlobSizeTest, WritingAfterEndOfBlobGrowsBlob_NonEmpty) { blob->resize(1); int value; blob->write(&value, 2, 4); - EXPECT_EQ(6, blob->size()); + EXPECT_EQ(6u, blob->size()); } TEST_F(BlobSizeTest, ChangingSizeImmediatelyFlushes) { diff --git a/test/blobstore/implementations/onblocks/BlobStoreTest.cpp b/test/blobstore/implementations/onblocks/BlobStoreTest.cpp index 2f6e5e6f..870ffe10 100644 --- a/test/blobstore/implementations/onblocks/BlobStoreTest.cpp +++ b/test/blobstore/implementations/onblocks/BlobStoreTest.cpp @@ -1,5 +1,5 @@ #include "testutils/BlobStoreTest.h" -#include +#include using blockstore::Key; using cpputils::unique_ref; diff --git a/test/blobstore/implementations/onblocks/datanodestore/DataInnerNodeTest.cpp b/test/blobstore/implementations/onblocks/datanodestore/DataInnerNodeTest.cpp index 9b804a66..ce413be3 100644 --- a/test/blobstore/implementations/onblocks/datanodestore/DataInnerNodeTest.cpp +++ b/test/blobstore/implementations/onblocks/datanodestore/DataInnerNodeTest.cpp @@ -1,14 +1,14 @@ -#include +#include -#include "../../../../implementations/onblocks/datanodestore/DataInnerNode.h" -#include "../../../../implementations/onblocks/datanodestore/DataLeafNode.h" -#include "../../../../implementations/onblocks/datanodestore/DataNodeStore.h" +#include "blobstore/implementations/onblocks/datanodestore/DataInnerNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataLeafNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataNodeStore.h" -#include "messmer/blockstore/implementations/testfake/FakeBlockStore.h" -#include "messmer/blockstore/implementations/testfake/FakeBlock.h" +#include +#include #include -#include "messmer/cpp-utils/pointer/cast.h" +#include using ::testing::Test; diff --git a/test/blobstore/implementations/onblocks/datanodestore/DataLeafNodeTest.cpp b/test/blobstore/implementations/onblocks/datanodestore/DataLeafNodeTest.cpp index 0a179bb3..a53df1a9 100644 --- a/test/blobstore/implementations/onblocks/datanodestore/DataLeafNodeTest.cpp +++ b/test/blobstore/implementations/onblocks/datanodestore/DataLeafNodeTest.cpp @@ -1,14 +1,14 @@ -#include "../../../../implementations/onblocks/datanodestore/DataLeafNode.h" -#include "../../../../implementations/onblocks/datanodestore/DataInnerNode.h" -#include "../../../../implementations/onblocks/datanodestore/DataNodeStore.h" -#include "../../../../implementations/onblocks/BlobStoreOnBlocks.h" -#include +#include "blobstore/implementations/onblocks/datanodestore/DataLeafNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataInnerNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataNodeStore.h" +#include "blobstore/implementations/onblocks/BlobStoreOnBlocks.h" +#include -#include "messmer/cpp-utils/pointer/cast.h" +#include -#include "messmer/blockstore/implementations/testfake/FakeBlockStore.h" -#include "messmer/blockstore/implementations/testfake/FakeBlock.h" -#include +#include +#include +#include using ::testing::Test; using ::testing::WithParamInterface; diff --git a/test/blobstore/implementations/onblocks/datanodestore/DataNodeStoreTest.cpp b/test/blobstore/implementations/onblocks/datanodestore/DataNodeStoreTest.cpp index 708002bc..05ee7f59 100644 --- a/test/blobstore/implementations/onblocks/datanodestore/DataNodeStoreTest.cpp +++ b/test/blobstore/implementations/onblocks/datanodestore/DataNodeStoreTest.cpp @@ -1,13 +1,13 @@ -#include "../../../../implementations/onblocks/datanodestore/DataInnerNode.h" -#include "../../../../implementations/onblocks/datanodestore/DataLeafNode.h" -#include "../../../../implementations/onblocks/datanodestore/DataNode.h" -#include "../../../../implementations/onblocks/datanodestore/DataNodeStore.h" -#include "../../../../implementations/onblocks/BlobStoreOnBlocks.h" -#include +#include "blobstore/implementations/onblocks/datanodestore/DataInnerNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataLeafNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataNodeStore.h" +#include "blobstore/implementations/onblocks/BlobStoreOnBlocks.h" +#include -#include "messmer/blockstore/implementations/testfake/FakeBlockStore.h" -#include "messmer/blockstore/implementations/testfake/FakeBlock.h" -#include +#include +#include +#include using ::testing::Test; using cpputils::unique_ref; @@ -109,29 +109,29 @@ TEST_F(DataNodeStoreTest, NodeIsNotLoadableAfterDeleting) { } TEST_F(DataNodeStoreTest, NumNodesIsCorrectOnEmptyNodestore) { - EXPECT_EQ(0, nodeStore->numNodes()); + EXPECT_EQ(0u, nodeStore->numNodes()); } TEST_F(DataNodeStoreTest, NumNodesIsCorrectAfterAddingOneLeafNode) { nodeStore->createNewLeafNode(); - EXPECT_EQ(1, nodeStore->numNodes()); + EXPECT_EQ(1u, nodeStore->numNodes()); } TEST_F(DataNodeStoreTest, NumNodesIsCorrectAfterRemovingTheLastNode) { auto leaf = nodeStore->createNewLeafNode(); nodeStore->remove(std::move(leaf)); - EXPECT_EQ(0, nodeStore->numNodes()); + EXPECT_EQ(0u, nodeStore->numNodes()); } TEST_F(DataNodeStoreTest, NumNodesIsCorrectAfterAddingTwoNodes) { auto leaf = nodeStore->createNewLeafNode(); auto node = nodeStore->createNewInnerNode(*leaf); - EXPECT_EQ(2, nodeStore->numNodes()); + EXPECT_EQ(2u, nodeStore->numNodes()); } TEST_F(DataNodeStoreTest, NumNodesIsCorrectAfterRemovingANode) { auto leaf = nodeStore->createNewLeafNode(); auto node = nodeStore->createNewInnerNode(*leaf); nodeStore->remove(std::move(node)); - EXPECT_EQ(1, nodeStore->numNodes()); + EXPECT_EQ(1u, nodeStore->numNodes()); } diff --git a/test/blobstore/implementations/onblocks/datanodestore/DataNodeViewTest.cpp b/test/blobstore/implementations/onblocks/datanodestore/DataNodeViewTest.cpp index 9b05bd03..3f31b31e 100644 --- a/test/blobstore/implementations/onblocks/datanodestore/DataNodeViewTest.cpp +++ b/test/blobstore/implementations/onblocks/datanodestore/DataNodeViewTest.cpp @@ -1,10 +1,10 @@ -#include "../../../../implementations/onblocks/datanodestore/DataNodeView.h" -#include +#include "blobstore/implementations/onblocks/datanodestore/DataNodeView.h" +#include -#include "messmer/blockstore/implementations/testfake/FakeBlockStore.h" -#include "messmer/blockstore/implementations/testfake/FakeBlock.h" -#include "../../../../implementations/onblocks/BlobStoreOnBlocks.h" -#include +#include +#include +#include "blobstore/implementations/onblocks/BlobStoreOnBlocks.h" +#include using ::testing::Test; using ::testing::WithParamInterface; diff --git a/test/blobstore/implementations/onblocks/datatreestore/DataTreeStoreTest.cpp b/test/blobstore/implementations/onblocks/datatreestore/DataTreeStoreTest.cpp index 8687d02e..01da3611 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/DataTreeStoreTest.cpp +++ b/test/blobstore/implementations/onblocks/datatreestore/DataTreeStoreTest.cpp @@ -1,9 +1,9 @@ #include "testutils/DataTreeTest.h" -#include "../../../../implementations/onblocks/datanodestore/DataNodeStore.h" -#include "../../../../implementations/onblocks/datatreestore/DataTreeStore.h" -#include -#include +#include "blobstore/implementations/onblocks/datanodestore/DataNodeStore.h" +#include "blobstore/implementations/onblocks/datatreestore/DataTreeStore.h" +#include +#include using blockstore::testfake::FakeBlockStore; using blockstore::Key; @@ -49,6 +49,6 @@ TEST_F(DataTreeStoreTest, RemovingTreeRemovesAllNodesOfTheTree) { treeStore.remove(std::move(tree1)); //Check that the only remaining node is tree2 - EXPECT_EQ(1, nodeStore->numNodes()); + EXPECT_EQ(1u, nodeStore->numNodes()); EXPECT_NE(none, treeStore.load(tree2_key)); } diff --git a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_NumStoredBytes.cpp b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_NumStoredBytes.cpp index 9c9451bc..17c12a6d 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_NumStoredBytes.cpp +++ b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_NumStoredBytes.cpp @@ -1,5 +1,5 @@ #include "testutils/DataTreeTest.h" -#include +#include using ::testing::_; using ::testing::WithParamInterface; @@ -18,7 +18,7 @@ public: TEST_F(DataTreeTest_NumStoredBytes, CreatedTreeIsEmpty) { auto tree = treeStore.createNewTree(); - EXPECT_EQ(0, tree->numStoredBytes()); + EXPECT_EQ(0u, tree->numStoredBytes()); } class DataTreeTest_NumStoredBytes_P: public DataTreeTest_NumStoredBytes, public WithParamInterface {}; diff --git a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeByTraversing.cpp b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeByTraversing.cpp index dc9383ce..9301d0e5 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeByTraversing.cpp +++ b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeByTraversing.cpp @@ -1,7 +1,7 @@ #include "testutils/DataTreeTest.h" #include "testutils/TwoLevelDataFixture.h" -#include "../../../../implementations/onblocks/utils/Math.h" -#include +#include "blobstore/implementations/onblocks/utils/Math.h" +#include #include diff --git a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeNumBytes.cpp b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeNumBytes.cpp index 958616bb..b5c6a4e4 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeNumBytes.cpp +++ b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_ResizeNumBytes.cpp @@ -1,7 +1,7 @@ #include "testutils/DataTreeTest.h" #include "testutils/TwoLevelDataFixture.h" -#include "../../../../implementations/onblocks/utils/Math.h" -#include +#include "blobstore/implementations/onblocks/utils/Math.h" +#include #include diff --git a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_TraverseLeaves.cpp b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_TraverseLeaves.cpp index 7e515c50..fdc1a109 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_TraverseLeaves.cpp +++ b/test/blobstore/implementations/onblocks/datatreestore/DataTreeTest_TraverseLeaves.cpp @@ -1,5 +1,5 @@ #include "testutils/DataTreeTest.h" -#include +#include using ::testing::_; diff --git a/test/blobstore/implementations/onblocks/datatreestore/impl/GetLowestInnerRightBorderNodeWithLessThanKChildrenOrNullTest.cpp b/test/blobstore/implementations/onblocks/datatreestore/impl/GetLowestInnerRightBorderNodeWithLessThanKChildrenOrNullTest.cpp index 744dd000..11445157 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/impl/GetLowestInnerRightBorderNodeWithLessThanKChildrenOrNullTest.cpp +++ b/test/blobstore/implementations/onblocks/datatreestore/impl/GetLowestInnerRightBorderNodeWithLessThanKChildrenOrNullTest.cpp @@ -1,11 +1,11 @@ -#include "google/gtest/gtest.h" +#include #include "../testutils/DataTreeTest.h" -#include "../../../../../implementations/onblocks/datatreestore/DataTree.h" -#include "../../../../../implementations/onblocks/datanodestore/DataLeafNode.h" -#include "../../../../../implementations/onblocks/datanodestore/DataInnerNode.h" -#include "messmer/blockstore/implementations/testfake/FakeBlockStore.h" -#include "../../../../../implementations/onblocks/datatreestore/impl/algorithms.h" +#include "blobstore/implementations/onblocks/datatreestore/DataTree.h" +#include "blobstore/implementations/onblocks/datanodestore/DataLeafNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataInnerNode.h" +#include +#include "blobstore/implementations/onblocks/datatreestore/impl/algorithms.h" using ::testing::Test; using std::pair; diff --git a/test/blobstore/implementations/onblocks/datatreestore/impl/GetLowestRightBorderNodeWithMoreThanOneChildOrNullTest.cpp b/test/blobstore/implementations/onblocks/datatreestore/impl/GetLowestRightBorderNodeWithMoreThanOneChildOrNullTest.cpp index 9810a309..1c2261a3 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/impl/GetLowestRightBorderNodeWithMoreThanOneChildOrNullTest.cpp +++ b/test/blobstore/implementations/onblocks/datatreestore/impl/GetLowestRightBorderNodeWithMoreThanOneChildOrNullTest.cpp @@ -1,11 +1,11 @@ -#include "google/gtest/gtest.h" +#include #include "../testutils/DataTreeTest.h" -#include "../../../../../implementations/onblocks/datatreestore/DataTree.h" -#include "../../../../../implementations/onblocks/datanodestore/DataLeafNode.h" -#include "../../../../../implementations/onblocks/datanodestore/DataInnerNode.h" -#include "messmer/blockstore/implementations/testfake/FakeBlockStore.h" -#include "../../../../../implementations/onblocks/datatreestore/impl/algorithms.h" +#include "blobstore/implementations/onblocks/datatreestore/DataTree.h" +#include "blobstore/implementations/onblocks/datanodestore/DataLeafNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataInnerNode.h" +#include +#include "blobstore/implementations/onblocks/datatreestore/impl/algorithms.h" using ::testing::Test; using std::pair; diff --git a/test/blobstore/implementations/onblocks/datatreestore/testutils/DataTreeTest.cpp b/test/blobstore/implementations/onblocks/datatreestore/testutils/DataTreeTest.cpp index d906dff0..1d749182 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/testutils/DataTreeTest.cpp +++ b/test/blobstore/implementations/onblocks/datatreestore/testutils/DataTreeTest.cpp @@ -1,8 +1,8 @@ #include "DataTreeTest.h" -#include "messmer/blockstore/implementations/testfake/FakeBlockStore.h" -#include -#include +#include +#include +#include using blobstore::onblocks::datanodestore::DataNodeStore; using blobstore::onblocks::datanodestore::DataNode; diff --git a/test/blobstore/implementations/onblocks/datatreestore/testutils/DataTreeTest.h b/test/blobstore/implementations/onblocks/datatreestore/testutils/DataTreeTest.h index dbc3a12e..0118c101 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/testutils/DataTreeTest.h +++ b/test/blobstore/implementations/onblocks/datatreestore/testutils/DataTreeTest.h @@ -2,13 +2,13 @@ #ifndef MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_DATATREETEST_H_ #define MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_DATATREETEST_H_ -#include "google/gtest/gtest.h" +#include -#include "../../../../../implementations/onblocks/datanodestore/DataNodeStore.h" -#include "../../../../../implementations/onblocks/datanodestore/DataInnerNode.h" -#include "../../../../../implementations/onblocks/datanodestore/DataLeafNode.h" -#include "../../../../../implementations/onblocks/datatreestore/DataTree.h" -#include "../../../../../implementations/onblocks/datatreestore/DataTreeStore.h" +#include "blobstore/implementations/onblocks/datanodestore/DataNodeStore.h" +#include "blobstore/implementations/onblocks/datanodestore/DataInnerNode.h" +#include "blobstore/implementations/onblocks/datanodestore/DataLeafNode.h" +#include "blobstore/implementations/onblocks/datatreestore/DataTree.h" +#include "blobstore/implementations/onblocks/datatreestore/DataTreeStore.h" class DataTreeTest: public ::testing::Test { public: diff --git a/test/blobstore/implementations/onblocks/datatreestore/testutils/LeafDataFixture.h b/test/blobstore/implementations/onblocks/datatreestore/testutils/LeafDataFixture.h index fc2952d2..4b00e533 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/testutils/LeafDataFixture.h +++ b/test/blobstore/implementations/onblocks/datatreestore/testutils/LeafDataFixture.h @@ -2,9 +2,9 @@ #ifndef MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_GROWING_TESTUTILS_LEAFDATAFIXTURE_H_ #define MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_GROWING_TESTUTILS_LEAFDATAFIXTURE_H_ -#include +#include -#include +#include // A data fixture containing data for a leaf. // The class can fill this data into a given leaf diff --git a/test/blobstore/implementations/onblocks/datatreestore/testutils/TwoLevelDataFixture.h b/test/blobstore/implementations/onblocks/datatreestore/testutils/TwoLevelDataFixture.h index d28fa306..c79599e0 100644 --- a/test/blobstore/implementations/onblocks/datatreestore/testutils/TwoLevelDataFixture.h +++ b/test/blobstore/implementations/onblocks/datatreestore/testutils/TwoLevelDataFixture.h @@ -2,10 +2,10 @@ #ifndef MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_GROWING_TESTUTILS_TWOLEVELDATAFIXTURE_H_ #define MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_GROWING_TESTUTILS_TWOLEVELDATAFIXTURE_H_ -#include -#include +#include +#include #include "LeafDataFixture.h" -#include +#include //TODO Rename, since we now allow any number of levels // A data fixture containing data for a two-level tree (one inner node with leaf children). diff --git a/test/blobstore/implementations/onblocks/testutils/BlobStoreTest.cpp b/test/blobstore/implementations/onblocks/testutils/BlobStoreTest.cpp index fc8d42f4..abf443ec 100644 --- a/test/blobstore/implementations/onblocks/testutils/BlobStoreTest.cpp +++ b/test/blobstore/implementations/onblocks/testutils/BlobStoreTest.cpp @@ -1,7 +1,7 @@ #include "BlobStoreTest.h" -#include -#include "../../../../implementations/onblocks/BlobStoreOnBlocks.h" +#include +#include "blobstore/implementations/onblocks/BlobStoreOnBlocks.h" using blobstore::onblocks::BlobStoreOnBlocks; using blockstore::testfake::FakeBlockStore; diff --git a/test/blobstore/implementations/onblocks/testutils/BlobStoreTest.h b/test/blobstore/implementations/onblocks/testutils/BlobStoreTest.h index 3442a22a..3cf277df 100644 --- a/test/blobstore/implementations/onblocks/testutils/BlobStoreTest.h +++ b/test/blobstore/implementations/onblocks/testutils/BlobStoreTest.h @@ -2,9 +2,9 @@ #ifndef MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_TESTUTILS_BLOBSTORETEST_H_ #define MESSMER_BLOBSTORE_TEST_IMPLEMENTATIONS_ONBLOCKS_TESTUTILS_BLOBSTORETEST_H_ -#include +#include -#include "../../../../interface/BlobStore.h" +#include "blobstore/interface/BlobStore.h" class BlobStoreTest: public ::testing::Test { public: diff --git a/test/blobstore/implementations/onblocks/utils/CeilDivisionTest.cpp b/test/blobstore/implementations/onblocks/utils/CeilDivisionTest.cpp index e2013840..af863111 100644 --- a/test/blobstore/implementations/onblocks/utils/CeilDivisionTest.cpp +++ b/test/blobstore/implementations/onblocks/utils/CeilDivisionTest.cpp @@ -1,5 +1,5 @@ -#include -#include "../../../../implementations/onblocks/utils/Math.h" +#include +#include "blobstore/implementations/onblocks/utils/Math.h" #include diff --git a/test/blobstore/implementations/onblocks/utils/CeilLogTest.cpp b/test/blobstore/implementations/onblocks/utils/CeilLogTest.cpp index a75c3cdf..8bf6d5a2 100644 --- a/test/blobstore/implementations/onblocks/utils/CeilLogTest.cpp +++ b/test/blobstore/implementations/onblocks/utils/CeilLogTest.cpp @@ -1,5 +1,5 @@ -#include -#include "../../../../implementations/onblocks/utils/Math.h" +#include +#include "blobstore/implementations/onblocks/utils/Math.h" #include diff --git a/test/blobstore/implementations/onblocks/utils/IntPowTest.cpp b/test/blobstore/implementations/onblocks/utils/IntPowTest.cpp index 26c5ffd1..f7533b69 100644 --- a/test/blobstore/implementations/onblocks/utils/IntPowTest.cpp +++ b/test/blobstore/implementations/onblocks/utils/IntPowTest.cpp @@ -1,5 +1,5 @@ -#include -#include "../../../../implementations/onblocks/utils/Math.h" +#include +#include "blobstore/implementations/onblocks/utils/Math.h" using namespace blobstore::onblocks::utils; using ::testing::Test; diff --git a/test/blobstore/implementations/onblocks/utils/MaxZeroSubtractionTest.cpp b/test/blobstore/implementations/onblocks/utils/MaxZeroSubtractionTest.cpp index f1bb81d2..f6a3101b 100644 --- a/test/blobstore/implementations/onblocks/utils/MaxZeroSubtractionTest.cpp +++ b/test/blobstore/implementations/onblocks/utils/MaxZeroSubtractionTest.cpp @@ -1,5 +1,5 @@ -#include -#include "../../../../implementations/onblocks/utils/Math.h" +#include +#include "blobstore/implementations/onblocks/utils/Math.h" #include diff --git a/test/blockstore/implementations/caching/CachingBlockStoreTest.cpp b/test/blockstore/implementations/caching/CachingBlockStoreTest.cpp index 312012ae..c57e1684 100644 --- a/test/blockstore/implementations/caching/CachingBlockStoreTest.cpp +++ b/test/blockstore/implementations/caching/CachingBlockStoreTest.cpp @@ -1,8 +1,8 @@ -#include "../../../implementations/caching/CachingBlockStore.h" -#include "../../../implementations/testfake/FakeBlockStore.h" +#include "blockstore/implementations/caching/CachingBlockStore.h" +#include "blockstore/implementations/testfake/FakeBlockStore.h" #include "../../testutils/BlockStoreTest.h" -#include "google/gtest/gtest.h" -#include +#include +#include using blockstore::BlockStore; diff --git a/test/blockstore/implementations/caching/cache/CacheTest_MoveConstructor.cpp b/test/blockstore/implementations/caching/cache/CacheTest_MoveConstructor.cpp index fa00da2d..e69a278b 100644 --- a/test/blockstore/implementations/caching/cache/CacheTest_MoveConstructor.cpp +++ b/test/blockstore/implementations/caching/cache/CacheTest_MoveConstructor.cpp @@ -1,6 +1,6 @@ -#include -#include -#include "../../../../implementations/caching/cache/Cache.h" +#include +#include +#include "blockstore/implementations/caching/cache/Cache.h" #include "testutils/MinimalKeyType.h" #include "testutils/CopyableMovableValueType.h" diff --git a/test/blockstore/implementations/caching/cache/CacheTest_PushAndPop.cpp b/test/blockstore/implementations/caching/cache/CacheTest_PushAndPop.cpp index df036f70..88f6462e 100644 --- a/test/blockstore/implementations/caching/cache/CacheTest_PushAndPop.cpp +++ b/test/blockstore/implementations/caching/cache/CacheTest_PushAndPop.cpp @@ -1,9 +1,9 @@ #include "testutils/CacheTest.h" -#include "../../../../implementations/caching/cache/Cache.h" +#include "blockstore/implementations/caching/cache/Cache.h" #include "testutils/MinimalKeyType.h" #include "testutils/MinimalValueType.h" -#include +#include using ::testing::Test; @@ -48,7 +48,7 @@ TEST_F(CacheTest_PushAndPop, FullCache) { push(i, 2*i); } for(unsigned int i = 0; i < MAX_ENTRIES; ++i) { - EXPECT_EQ(2*i, pop(i).value()); + EXPECT_EQ((signed int)(2*i), pop(i).value()); } } @@ -60,7 +60,7 @@ TEST_F(CacheTest_PushAndPop, FullCache_PushNonOrdered_PopOrdered) { push(i, 2*i); } for(unsigned int i = 0; i < MAX_ENTRIES; ++i) { - EXPECT_EQ(2*i, pop(i).value()); + EXPECT_EQ((signed int)(2*i), pop(i).value()); } } @@ -69,10 +69,10 @@ TEST_F(CacheTest_PushAndPop, FullCache_PushOrdered_PopNonOrdered) { push(i, 2*i); } for(unsigned int i = 1; i < MAX_ENTRIES; i += 2) { - EXPECT_EQ(2*i, pop(i).value()); + EXPECT_EQ((signed int)(2*i), pop(i).value()); } for(unsigned int i = 0; i < MAX_ENTRIES; i += 2) { - EXPECT_EQ(2*i, pop(i).value()); + EXPECT_EQ((signed int)(2*i), pop(i).value()); } } @@ -100,10 +100,10 @@ TEST_F(CacheTest_PushAndPop, FullCache_PushNonOrdered_PopNonOrdered) { push(i, 2*i); } for(int i = roundDownToOdd(MAX_ENTRIES-1); i >= 0; i -= 2) { - EXPECT_EQ(2*i, pop(i).value()); + EXPECT_EQ((signed int)(2*i), pop(i).value()); } for(unsigned int i = 0; i < MAX_ENTRIES; i += 2) { - EXPECT_EQ(2*i, pop(i).value()); + EXPECT_EQ((signed int)(2*i), pop(i).value()); } } @@ -116,7 +116,7 @@ TEST_F(CacheTest_PushAndPop, MoreThanFullCache) { EXPECT_EQ(boost::none, pop(1)); //Check the other elements are still there for(unsigned int i = 2; i < MAX_ENTRIES + 2; ++i) { - EXPECT_EQ(2*i, pop(i).value()); + EXPECT_EQ((signed int)(2*i), pop(i).value()); } } diff --git a/test/blockstore/implementations/caching/cache/CacheTest_RaceCondition.cpp b/test/blockstore/implementations/caching/cache/CacheTest_RaceCondition.cpp index 329f6d22..51531e58 100644 --- a/test/blockstore/implementations/caching/cache/CacheTest_RaceCondition.cpp +++ b/test/blockstore/implementations/caching/cache/CacheTest_RaceCondition.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include using namespace blockstore::caching; using std::chrono::seconds; diff --git a/test/blockstore/implementations/caching/cache/PeriodicTaskTest.cpp b/test/blockstore/implementations/caching/cache/PeriodicTaskTest.cpp index d49492ad..46843015 100644 --- a/test/blockstore/implementations/caching/cache/PeriodicTaskTest.cpp +++ b/test/blockstore/implementations/caching/cache/PeriodicTaskTest.cpp @@ -1,6 +1,6 @@ -#include +#include -#include "../../../../implementations/caching/cache/PeriodicTask.h" +#include "blockstore/implementations/caching/cache/PeriodicTask.h" #include #include diff --git a/test/blockstore/implementations/caching/cache/QueueMapTest_MoveConstructor.cpp b/test/blockstore/implementations/caching/cache/QueueMapTest_MoveConstructor.cpp index aab5eee9..2a0126ec 100644 --- a/test/blockstore/implementations/caching/cache/QueueMapTest_MoveConstructor.cpp +++ b/test/blockstore/implementations/caching/cache/QueueMapTest_MoveConstructor.cpp @@ -1,6 +1,6 @@ -#include -#include -#include "../../../../implementations/caching/cache/QueueMap.h" +#include +#include +#include "blockstore/implementations/caching/cache/QueueMap.h" #include "testutils/MinimalKeyType.h" #include "testutils/CopyableMovableValueType.h" diff --git a/test/blockstore/implementations/caching/cache/QueueMapTest_Values.cpp b/test/blockstore/implementations/caching/cache/QueueMapTest_Values.cpp index 9d5cfcbe..0532c366 100644 --- a/test/blockstore/implementations/caching/cache/QueueMapTest_Values.cpp +++ b/test/blockstore/implementations/caching/cache/QueueMapTest_Values.cpp @@ -1,5 +1,5 @@ #include "testutils/QueueMapTest.h" -#include +#include class QueueMapTest_Values: public QueueMapTest {}; diff --git a/test/blockstore/implementations/caching/cache/testutils/CacheTest.h b/test/blockstore/implementations/caching/cache/testutils/CacheTest.h index f9000b3f..f4c520b1 100644 --- a/test/blockstore/implementations/caching/cache/testutils/CacheTest.h +++ b/test/blockstore/implementations/caching/cache/testutils/CacheTest.h @@ -2,8 +2,8 @@ #ifndef MESSMER_BLOCKSTORE_TEST_IMPLEMENTATIONS_CACHING_CACHE_TESTUTILS_QUEUEMAPTEST_H_ #define MESSMER_BLOCKSTORE_TEST_IMPLEMENTATIONS_CACHING_CACHE_TESTUTILS_QUEUEMAPTEST_H_ -#include -#include "../../../../../implementations/caching/cache/Cache.h" +#include +#include "blockstore/implementations/caching/cache/Cache.h" #include "MinimalKeyType.h" #include "MinimalValueType.h" #include diff --git a/test/blockstore/implementations/caching/cache/testutils/MinimalValueType.h b/test/blockstore/implementations/caching/cache/testutils/MinimalValueType.h index d2be569f..72d4aef2 100644 --- a/test/blockstore/implementations/caching/cache/testutils/MinimalValueType.h +++ b/test/blockstore/implementations/caching/cache/testutils/MinimalValueType.h @@ -2,9 +2,9 @@ #ifndef MESSMER_BLOCKSTORE_TEST_IMPLEMENTATIONS_CACHING_CACHE_TESTUTILS_MINIMALVALUETYPE_H_ #define MESSMER_BLOCKSTORE_TEST_IMPLEMENTATIONS_CACHING_CACHE_TESTUTILS_MINIMALVALUETYPE_H_ -#include +#include #include -#include +#include // This is a not-default-constructible non-copyable but moveable Value type class MinimalValueType { diff --git a/test/blockstore/implementations/caching/cache/testutils/QueueMapTest.h b/test/blockstore/implementations/caching/cache/testutils/QueueMapTest.h index 59796803..c4d4cf00 100644 --- a/test/blockstore/implementations/caching/cache/testutils/QueueMapTest.h +++ b/test/blockstore/implementations/caching/cache/testutils/QueueMapTest.h @@ -2,9 +2,9 @@ #ifndef MESSMER_BLOCKSTORE_TEST_IMPLEMENTATIONS_CACHING_CACHE_TESTUTILS_QUEUEMAPTEST_H_ #define MESSMER_BLOCKSTORE_TEST_IMPLEMENTATIONS_CACHING_CACHE_TESTUTILS_QUEUEMAPTEST_H_ -#include -#include -#include "../../../../../implementations/caching/cache/QueueMap.h" +#include +#include +#include "blockstore/implementations/caching/cache/QueueMap.h" #include "MinimalKeyType.h" #include "MinimalValueType.h" #include diff --git a/test/blockstore/implementations/compressing/CompressingBlockStoreTest.cpp b/test/blockstore/implementations/compressing/CompressingBlockStoreTest.cpp index 99a668e1..15dfd538 100644 --- a/test/blockstore/implementations/compressing/CompressingBlockStoreTest.cpp +++ b/test/blockstore/implementations/compressing/CompressingBlockStoreTest.cpp @@ -1,9 +1,9 @@ -#include "../../../implementations/compressing/CompressingBlockStore.h" -#include "../../../implementations/compressing/compressors/Gzip.h" -#include "../../../implementations/compressing/compressors/RunLengthEncoding.h" -#include "../../../implementations/testfake/FakeBlockStore.h" +#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 "google/gtest/gtest.h" +#include using ::testing::Test; diff --git a/test/blockstore/implementations/compressing/compressors/testutils/CompressorTest.cpp b/test/blockstore/implementations/compressing/compressors/testutils/CompressorTest.cpp index 41fc4f26..6916b142 100644 --- a/test/blockstore/implementations/compressing/compressors/testutils/CompressorTest.cpp +++ b/test/blockstore/implementations/compressing/compressors/testutils/CompressorTest.cpp @@ -1,7 +1,7 @@ -#include -#include "../../../../../implementations/compressing/compressors/Gzip.h" -#include "../../../../../implementations/compressing/compressors/RunLengthEncoding.h" -#include +#include +#include "blockstore/implementations/compressing/compressors/Gzip.h" +#include "blockstore/implementations/compressing/compressors/RunLengthEncoding.h" +#include using namespace blockstore::compressing; using cpputils::Data; diff --git a/test/blockstore/implementations/encrypted/EncryptedBlockStoreTest_Generic.cpp b/test/blockstore/implementations/encrypted/EncryptedBlockStoreTest_Generic.cpp index 9d3798d9..e4c4362b 100644 --- a/test/blockstore/implementations/encrypted/EncryptedBlockStoreTest_Generic.cpp +++ b/test/blockstore/implementations/encrypted/EncryptedBlockStoreTest_Generic.cpp @@ -1,10 +1,11 @@ -#include -#include -#include "../../../implementations/encrypted/EncryptedBlockStore.h" -#include "../../../implementations/testfake/FakeBlockStore.h" +#include +#include +#include "blockstore/implementations/encrypted/EncryptedBlockStore.h" +#include "blockstore/implementations/testfake/FakeBlockStore.h" #include "../../testutils/BlockStoreTest.h" -#include -#include "google/gtest/gtest.h" +//TODO Move FakeAuthenticatedCipher out of test folder to normal folder. Dependencies should not point into tests of other modules. +#include "../../../cpp-utils/crypto/symmetric/testutils/FakeAuthenticatedCipher.h" +#include using ::testing::Test; diff --git a/test/blockstore/implementations/encrypted/EncryptedBlockStoreTest_Specific.cpp b/test/blockstore/implementations/encrypted/EncryptedBlockStoreTest_Specific.cpp index e8ba7372..9f22da0d 100644 --- a/test/blockstore/implementations/encrypted/EncryptedBlockStoreTest_Specific.cpp +++ b/test/blockstore/implementations/encrypted/EncryptedBlockStoreTest_Specific.cpp @@ -1,9 +1,9 @@ -#include -#include -#include "../../../implementations/encrypted/EncryptedBlockStore.h" -#include "../../../implementations/testfake/FakeBlockStore.h" -#include "../../../utils/BlockStoreUtils.h" -#include +#include +#include "../../../cpp-utils/crypto/symmetric/testutils/FakeAuthenticatedCipher.h" +#include "blockstore/implementations/encrypted/EncryptedBlockStore.h" +#include "blockstore/implementations/testfake/FakeBlockStore.h" +#include "blockstore/utils/BlockStoreUtils.h" +#include using ::testing::Test; diff --git a/test/blockstore/implementations/inmemory/InMemoryBlockStoreTest.cpp b/test/blockstore/implementations/inmemory/InMemoryBlockStoreTest.cpp index 6c4c1fe5..ddac72d8 100644 --- a/test/blockstore/implementations/inmemory/InMemoryBlockStoreTest.cpp +++ b/test/blockstore/implementations/inmemory/InMemoryBlockStoreTest.cpp @@ -1,9 +1,9 @@ -#include "../../../implementations/inmemory/InMemoryBlock.h" -#include "../../../implementations/inmemory/InMemoryBlockStore.h" +#include "blockstore/implementations/inmemory/InMemoryBlock.h" +#include "blockstore/implementations/inmemory/InMemoryBlockStore.h" #include "../../testutils/BlockStoreTest.h" #include "../../testutils/BlockStoreWithRandomKeysTest.h" -#include "google/gtest/gtest.h" -#include +#include +#include using blockstore::BlockStore; diff --git a/test/blockstore/implementations/ondisk/OnDiskBlockStoreTest.cpp b/test/blockstore/implementations/ondisk/OnDiskBlockStoreTest.cpp index fc59b57b..f7936eba 100644 --- a/test/blockstore/implementations/ondisk/OnDiskBlockStoreTest.cpp +++ b/test/blockstore/implementations/ondisk/OnDiskBlockStoreTest.cpp @@ -1,10 +1,10 @@ -#include "../../../implementations/ondisk/OnDiskBlock.h" -#include "../../../implementations/ondisk/OnDiskBlockStore.h" +#include "blockstore/implementations/ondisk/OnDiskBlock.h" +#include "blockstore/implementations/ondisk/OnDiskBlockStore.h" #include "../../testutils/BlockStoreTest.h" #include "../../testutils/BlockStoreWithRandomKeysTest.h" -#include "google/gtest/gtest.h" +#include -#include "messmer/cpp-utils/tempfile/TempDir.h" +#include using blockstore::BlockStore; diff --git a/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockCreateTest.cpp b/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockCreateTest.cpp index 06b5556a..5de0ede1 100644 --- a/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockCreateTest.cpp +++ b/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockCreateTest.cpp @@ -1,8 +1,8 @@ -#include "../../../../implementations/ondisk/OnDiskBlock.h" -#include "google/gtest/gtest.h" +#include "blockstore/implementations/ondisk/OnDiskBlock.h" +#include -#include -#include +#include +#include using ::testing::Test; using ::testing::WithParamInterface; diff --git a/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockFlushTest.cpp b/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockFlushTest.cpp index 619924b2..6300e034 100644 --- a/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockFlushTest.cpp +++ b/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockFlushTest.cpp @@ -1,9 +1,9 @@ -#include "../../../../implementations/ondisk/OnDiskBlock.h" -#include -#include "google/gtest/gtest.h" +#include "blockstore/implementations/ondisk/OnDiskBlock.h" +#include +#include -#include -#include +#include +#include using ::testing::Test; using ::testing::WithParamInterface; diff --git a/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockLoadTest.cpp b/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockLoadTest.cpp index 1dc00625..a73d9a20 100644 --- a/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockLoadTest.cpp +++ b/test/blockstore/implementations/ondisk/OnDiskBlockTest/OnDiskBlockLoadTest.cpp @@ -1,12 +1,12 @@ -#include "../../../../implementations/ondisk/OnDiskBlock.h" -#include -#include "../../../../utils/FileDoesntExistException.h" -#include "google/gtest/gtest.h" +#include "blockstore/implementations/ondisk/OnDiskBlock.h" +#include +#include "blockstore/utils/FileDoesntExistException.h" +#include -#include -#include -#include -#include +#include +#include +#include +#include #include using ::testing::Test; diff --git a/test/blockstore/implementations/parallelaccess/ParallelAccessBlockStoreTest.cpp b/test/blockstore/implementations/parallelaccess/ParallelAccessBlockStoreTest.cpp index c3647a1e..c33c82e7 100644 --- a/test/blockstore/implementations/parallelaccess/ParallelAccessBlockStoreTest.cpp +++ b/test/blockstore/implementations/parallelaccess/ParallelAccessBlockStoreTest.cpp @@ -1,7 +1,7 @@ -#include "../../../implementations/parallelaccess/ParallelAccessBlockStore.h" -#include "../../../implementations/testfake/FakeBlockStore.h" +#include "blockstore/implementations/parallelaccess/ParallelAccessBlockStore.h" +#include "blockstore/implementations/testfake/FakeBlockStore.h" #include "../../testutils/BlockStoreTest.h" -#include "google/gtest/gtest.h" +#include using blockstore::BlockStore; diff --git a/test/blockstore/implementations/testfake/TestFakeBlockStoreTest.cpp b/test/blockstore/implementations/testfake/TestFakeBlockStoreTest.cpp index 55e04577..09bd86e1 100644 --- a/test/blockstore/implementations/testfake/TestFakeBlockStoreTest.cpp +++ b/test/blockstore/implementations/testfake/TestFakeBlockStoreTest.cpp @@ -1,8 +1,8 @@ -#include "../../../implementations/testfake/FakeBlock.h" -#include "../../../implementations/testfake/FakeBlockStore.h" +#include "blockstore/implementations/testfake/FakeBlock.h" +#include "blockstore/implementations/testfake/FakeBlockStore.h" #include "../../testutils/BlockStoreTest.h" #include "../../testutils/BlockStoreWithRandomKeysTest.h" -#include "google/gtest/gtest.h" +#include using blockstore::BlockStore; diff --git a/test/blockstore/interface/BlockStoreTest.cpp b/test/blockstore/interface/BlockStoreTest.cpp index c452c306..6b2b29c9 100644 --- a/test/blockstore/interface/BlockStoreTest.cpp +++ b/test/blockstore/interface/BlockStoreTest.cpp @@ -1,4 +1,4 @@ /* * Tests that the header can be included without needing additional header includes as dependencies. */ -#include "../../interface/BlockStore.h" +#include "blockstore/interface/BlockStore.h" diff --git a/test/blockstore/interface/BlockTest.cpp b/test/blockstore/interface/BlockTest.cpp index a2d0f322..a2db4214 100644 --- a/test/blockstore/interface/BlockTest.cpp +++ b/test/blockstore/interface/BlockTest.cpp @@ -1,4 +1,4 @@ /* * Tests that the header can be included without needing additional header includes as dependencies. */ -#include "../../interface/Block.h" +#include "blockstore/interface/Block.h" diff --git a/test/blockstore/interface/helpers/BlockStoreWithRandomKeysTest.cpp b/test/blockstore/interface/helpers/BlockStoreWithRandomKeysTest.cpp index fd9fe959..a3a1acef 100644 --- a/test/blockstore/interface/helpers/BlockStoreWithRandomKeysTest.cpp +++ b/test/blockstore/interface/helpers/BlockStoreWithRandomKeysTest.cpp @@ -1,7 +1,7 @@ -#include "../../../interface/helpers/BlockStoreWithRandomKeys.h" -#include "google/gtest/gtest.h" -#include "google/gmock/gmock.h" -#include +#include "blockstore/interface/helpers/BlockStoreWithRandomKeys.h" +#include +#include +#include using ::testing::Test; using ::testing::_; diff --git a/test/blockstore/testutils/BlockStoreTest.h b/test/blockstore/testutils/BlockStoreTest.h index 91980125..830cb3f2 100644 --- a/test/blockstore/testutils/BlockStoreTest.h +++ b/test/blockstore/testutils/BlockStoreTest.h @@ -2,9 +2,9 @@ #ifndef MESSMER_BLOCKSTORE_TEST_IMPLEMENTATIONS_TESTUTILS_BLOCKSTORETEST_H_ #define MESSMER_BLOCKSTORE_TEST_IMPLEMENTATIONS_TESTUTILS_BLOCKSTORETEST_H_ -#include "google/gtest/gtest.h" +#include -#include "../../interface/BlockStore.h" +#include "blockstore/interface/BlockStore.h" class BlockStoreTestFixture { public: @@ -45,54 +45,54 @@ TYPED_TEST_P(BlockStoreTest, BlockIsNotLoadableAfterDeleting) { TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectOnEmptyBlockstore) { auto blockStore = this->fixture.createBlockStore(); - EXPECT_EQ(0, blockStore->numBlocks()); + EXPECT_EQ(0u, blockStore->numBlocks()); } TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectAfterAddingOneBlock) { auto blockStore = this->fixture.createBlockStore(); auto block = blockStore->create(cpputils::Data(1)); - EXPECT_EQ(1, blockStore->numBlocks()); + EXPECT_EQ(1u, blockStore->numBlocks()); } TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectAfterAddingOneBlock_AfterClosingBlock) { auto blockStore = this->fixture.createBlockStore(); blockStore->create(cpputils::Data(1)); - EXPECT_EQ(1, blockStore->numBlocks()); + EXPECT_EQ(1u, blockStore->numBlocks()); } TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectAfterRemovingTheLastBlock) { auto blockStore = this->fixture.createBlockStore(); auto block = blockStore->create(cpputils::Data(1)); blockStore->remove(std::move(block)); - EXPECT_EQ(0, blockStore->numBlocks()); + EXPECT_EQ(0u, blockStore->numBlocks()); } TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectAfterAddingTwoBlocks) { auto blockStore = this->fixture.createBlockStore(); auto block1 = blockStore->create(cpputils::Data(1)); auto block2 = blockStore->create(cpputils::Data(0)); - EXPECT_EQ(2, blockStore->numBlocks()); + EXPECT_EQ(2u, blockStore->numBlocks()); } TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectAfterAddingTwoBlocks_AfterClosingFirstBlock) { auto blockStore = this->fixture.createBlockStore(); blockStore->create(cpputils::Data(1)); auto block2 = blockStore->create(cpputils::Data(0)); - EXPECT_EQ(2, blockStore->numBlocks()); + EXPECT_EQ(2u, blockStore->numBlocks()); } TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectAfterAddingTwoBlocks_AfterClosingSecondBlock) { auto blockStore = this->fixture.createBlockStore(); auto block1 = blockStore->create(cpputils::Data(1)); blockStore->create(cpputils::Data(0)); - EXPECT_EQ(2, blockStore->numBlocks()); + EXPECT_EQ(2u, blockStore->numBlocks()); } TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectAfterAddingTwoBlocks_AfterClosingBothBlocks) { auto blockStore = this->fixture.createBlockStore(); blockStore->create(cpputils::Data(1)); blockStore->create(cpputils::Data(0)); - EXPECT_EQ(2, blockStore->numBlocks()); + EXPECT_EQ(2u, blockStore->numBlocks()); } TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectAfterRemovingABlock) { @@ -100,7 +100,7 @@ TYPED_TEST_P(BlockStoreTest, NumBlocksIsCorrectAfterRemovingABlock) { auto block = blockStore->create(cpputils::Data(1)); blockStore->create(cpputils::Data(1)); blockStore->remove(std::move(block)); - EXPECT_EQ(1, blockStore->numBlocks()); + EXPECT_EQ(1u, blockStore->numBlocks()); } TYPED_TEST_P(BlockStoreTest, CanRemoveModifiedBlock) { @@ -108,7 +108,7 @@ TYPED_TEST_P(BlockStoreTest, CanRemoveModifiedBlock) { auto block = blockStore->create(cpputils::Data(5)); block->write("data", 0, 4); blockStore->remove(std::move(block)); - EXPECT_EQ(0, blockStore->numBlocks()); + EXPECT_EQ(0u, blockStore->numBlocks()); } #include "BlockStoreTest_Size.h" diff --git a/test/blockstore/testutils/BlockStoreTest_Size.h b/test/blockstore/testutils/BlockStoreTest_Size.h index d233d7d9..85effa79 100644 --- a/test/blockstore/testutils/BlockStoreTest_Size.h +++ b/test/blockstore/testutils/BlockStoreTest_Size.h @@ -4,8 +4,8 @@ // This file is meant to be included by BlockStoreTest.h only -#include -#include +#include +#include class BlockStoreSizeParameterizedTest { public: diff --git a/test/blockstore/testutils/BlockStoreWithRandomKeysTest.h b/test/blockstore/testutils/BlockStoreWithRandomKeysTest.h index 6dbcbf96..a394f55d 100644 --- a/test/blockstore/testutils/BlockStoreWithRandomKeysTest.h +++ b/test/blockstore/testutils/BlockStoreWithRandomKeysTest.h @@ -2,9 +2,9 @@ #ifndef MESSMER_BLOCKSTORE_TEST_TESTUTILS_BLOCKSTOREWITHRANDOMKEYSTEST_H_ #define MESSMER_BLOCKSTORE_TEST_TESTUTILS_BLOCKSTOREWITHRANDOMKEYSTEST_H_ -#include +#include -#include "../../interface/BlockStore.h" +#include "blockstore/interface/BlockStore.h" class BlockStoreWithRandomKeysTestFixture { public: diff --git a/test/blockstore/utils/BlockStoreUtilsTest.cpp b/test/blockstore/utils/BlockStoreUtilsTest.cpp index ecd5c610..dc90a07a 100644 --- a/test/blockstore/utils/BlockStoreUtilsTest.cpp +++ b/test/blockstore/utils/BlockStoreUtilsTest.cpp @@ -1,7 +1,7 @@ -#include "../../implementations/testfake/FakeBlockStore.h" -#include -#include "../../utils/BlockStoreUtils.h" -#include "google/gtest/gtest.h" +#include "blockstore/implementations/testfake/FakeBlockStore.h" +#include +#include "blockstore/utils/BlockStoreUtils.h" +#include #include