From 114284a58f6013371cb718fad8feaf0b3988fcb2 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Thu, 11 Dec 2014 01:31:21 +0100 Subject: [PATCH] Create a FakeBlockStore and use it instead of InMemoryBlockStore in tests --- src/test/testutils/DataBlockFixture.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/testutils/DataBlockFixture.cpp b/src/test/testutils/DataBlockFixture.cpp index b4413121..ec50b91c 100644 --- a/src/test/testutils/DataBlockFixture.cpp +++ b/src/test/testutils/DataBlockFixture.cpp @@ -20,6 +20,12 @@ void DataBlockFixture::fillFileWithRandomData(long long int IV) { val += 1442695040888963407; reinterpret_cast(_fileData)[i] = val; } + //Fill remaining bytes + for(size_t i=(_size/sizeof(long long int))*sizeof(long long int); i<_size; ++i) { + val *= 6364136223846793005L; + val += 1442695040888963407; + reinterpret_cast(_fileData)[i] = val; + } } const char *DataBlockFixture::data() const {