Test BlockStoreUtils fillWithZeroes()
This commit is contained in:
parent
71f55361b4
commit
ffd9ada260
@ -32,6 +32,14 @@ public:
|
||||
unique_ptr<BlockStore> blockStore;
|
||||
};
|
||||
|
||||
TEST_F(BlockStoreUtilsTest, FillWithZeroes) {
|
||||
auto block = blockStore->create(SIZE);
|
||||
block->write(dataFixture.data(), 0, SIZE);
|
||||
EXPECT_NE(0, std::memcmp(ZEROES.data(), block->data(), SIZE));
|
||||
fillWithZeroes(block.get());
|
||||
EXPECT_EQ(0, std::memcmp(ZEROES.data(), block->data(), SIZE));
|
||||
}
|
||||
|
||||
class BlockStoreUtilsTest_CopyToNewBlock: public BlockStoreUtilsTest {};
|
||||
|
||||
TEST_F(BlockStoreUtilsTest_CopyToNewBlock, CopyEmptyBlock) {
|
||||
|
@ -13,8 +13,6 @@ std::unique_ptr<Block> copyToNewBlock(BlockStore *blockStore, const Block &block
|
||||
void copyTo(Block *target, const Block &source);
|
||||
void fillWithZeroes(Block *target);
|
||||
|
||||
//TODO Test fillWithZeroes
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user