Added test cases for OnDiskBlob that load and compare data
This commit is contained in:
parent
323dfde2cf
commit
b652daec94
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user