From 9cc3697e1b4bf0a4986aaaba771dd71b26ea69c3 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Thu, 28 Sep 2017 15:13:03 -0700 Subject: [PATCH] Fix CI build --- test/blockstore/interface/BlockStore2Test.cpp | 6 ++++++ test/blockstore/testutils/BlockStoreTest.h | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/test/blockstore/interface/BlockStore2Test.cpp b/test/blockstore/interface/BlockStore2Test.cpp index 9d8bf171..4dc36eb1 100644 --- a/test/blockstore/interface/BlockStore2Test.cpp +++ b/test/blockstore/interface/BlockStore2Test.cpp @@ -16,6 +16,12 @@ using cpputils::DataFixture; using cpputils::unique_ref; using boost::optional; +namespace boost { + inline void PrintTo(const optional &, ::std::ostream *os) { + *os << "optional"; + } +} + using namespace blockstore; class BlockStore2Mock: public BlockStore2 { diff --git a/test/blockstore/testutils/BlockStoreTest.h b/test/blockstore/testutils/BlockStoreTest.h index 4dcd8276..517da3ca 100644 --- a/test/blockstore/testutils/BlockStoreTest.h +++ b/test/blockstore/testutils/BlockStoreTest.h @@ -285,7 +285,7 @@ TYPED_TEST_P(BlockStoreTest, Resize_Smaller_ToZero_BlockIsStillUsable) { block->resize(0); this->TestBlockIsUsable(std::move(block), blockStore.get()); } - +/* TYPED_TEST_P(BlockStoreTest, TryCreateTwoBlocksWithSameBlockIdAndSameSize) { auto blockStore = this->fixture.createBlockStore(); blockstore::BlockId blockId = blockstore::BlockId::FromString("1491BB4932A389EE14BC7090AC772972"); @@ -295,7 +295,7 @@ TYPED_TEST_P(BlockStoreTest, TryCreateTwoBlocksWithSameBlockIdAndSameSize) { EXPECT_NE(boost::none, block); EXPECT_EQ(boost::none, block2); } -/* + TYPED_TEST_P(BlockStoreTest, TryCreateTwoBlocksWithSameBlockIdAndDifferentSize) { auto blockStore = this->fixture.createBlockStore(); blockstore::BlockId blockId = blockstore::BlockId::FromString("1491BB4932A389EE14BC7090AC772972"); @@ -383,6 +383,7 @@ REGISTER_TYPED_TEST_CASE_P(BlockStoreTest, ForEachBlock_twoblocks, ForEachBlock_threeblocks, ForEachBlock_doesntListRemovedBlocks_oneblock, + ForEachBlock_doesntListRemovedBlocks_twoblocks, Resize_Larger_FromZero, Resize_Larger_FromZero_BlockIsStillUsable, Resize_Larger, @@ -390,10 +391,10 @@ REGISTER_TYPED_TEST_CASE_P(BlockStoreTest, Resize_Smaller, Resize_Smaller_BlockIsStillUsable, Resize_Smaller_ToZero, - Resize_Smaller_ToZero_BlockIsStillUsable, - TryCreateTwoBlocksWithSameBlockIdAndSameSize + Resize_Smaller_ToZero_BlockIsStillUsable //TODO Just disabled because gtest doesn't allow more template parameters. Fix and reenable! // see https://github.com/google/googletest/issues/1267 + //TryCreateTwoBlocksWithSameBlockIdAndSameSize, //TryCreateTwoBlocksWithSameBlockIdAndDifferentSize, //TryCreateTwoBlocksWithSameBlockIdAndFirstNullSize, //TryCreateTwoBlocksWithSameBlockIdAndSecondNullSize,