From 2d45783414d05eec172a48d0ae04c3875c0d273a Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Fri, 5 Dec 2014 11:50:24 +0100 Subject: [PATCH] Added test cases for OnDiskBlob that load and compare data --- src/test/testutils/VirtualTestFile.cpp | 4 ++-- src/test/testutils/VirtualTestFile.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/testutils/VirtualTestFile.cpp b/src/test/testutils/VirtualTestFile.cpp index 24be134d..ac863572 100644 --- a/src/test/testutils/VirtualTestFile.cpp +++ b/src/test/testutils/VirtualTestFile.cpp @@ -23,7 +23,7 @@ void VirtualTestFile::fillFileWithRandomData(long long int IV) { } } -const char *VirtualTestFile::data() { +const char *VirtualTestFile::data() const { return _fileData; } @@ -33,7 +33,7 @@ int VirtualTestFile::read(void *buf, size_t count, off_t offset) { return realCount; } -size_t VirtualTestFile::size() { +size_t VirtualTestFile::size() const { return _size; } diff --git a/src/test/testutils/VirtualTestFile.h b/src/test/testutils/VirtualTestFile.h index 1b3de2aa..2751be2f 100644 --- a/src/test/testutils/VirtualTestFile.h +++ b/src/test/testutils/VirtualTestFile.h @@ -14,9 +14,9 @@ public: // Return true, iff the given data is equal to the data of the file at the given offset. bool fileContentEqual(const char *content, size_t count, off_t offset); - const char *data(); + const char *data() const; - size_t size(); + size_t size() const; protected: char *_fileData;