Added test cases for OnDiskBlob that load and compare data

This commit is contained in:
Sebastian Messmer 2014-12-05 11:50:24 +01:00
parent 323dfde2cf
commit b652daec94
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ void VirtualTestFile::fillFileWithRandomData(long long int IV) {
} }
} }
const char *VirtualTestFile::data() { const char *VirtualTestFile::data() const {
return _fileData; return _fileData;
} }
@ -33,7 +33,7 @@ int VirtualTestFile::read(void *buf, size_t count, off_t offset) {
return realCount; return realCount;
} }
size_t VirtualTestFile::size() { size_t VirtualTestFile::size() const {
return _size; return _size;
} }

View File

@ -14,9 +14,9 @@ public:
// Return true, iff the given data is equal to the data of the file at the given offset. // 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); 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: protected:
char *_fileData; char *_fileData;