5 #ifndef STORAGE_LEVELDB_UTIL_TESTUTIL_H_
6 #define STORAGE_LEVELDB_UTIL_TESTUTIL_H_
17 extern Slice
RandomString(Random* rnd,
int len, std::string* dst);
21 extern std::string
RandomKey(Random* rnd,
int len);
27 int len, std::string* dst);
36 writable_file_error_(false),
37 num_writable_file_errors_(0) { }
41 if (writable_file_error_) {
53 #endif // STORAGE_LEVELDB_UTIL_TESTUTIL_H_
Slice CompressibleString(Random *rnd, double compressed_fraction, int len, std::string *dst)
bool writable_file_error_
virtual Status NewWritableFile(const std::string &fname, WritableFile **result)
virtual Status NewWritableFile(const std::string &fname, WritableFile **result)=0
std::string RandomKey(Random *rnd, int len)
Slice RandomString(Random *rnd, int len, std::string *dst)
int num_writable_file_errors_
static Status IOError(const Slice &msg, const Slice &msg2=Slice())