mirror of
https://github.com/google/leveldb.git
synced 2024-11-27 15:39:03 +08:00
Defend against inclusion of windows.h in tests that invoke
Env::DeleteFile. PiperOrigin-RevId: 283607548
This commit is contained in:
parent
58a89bbcb2
commit
d152b23f3b
@ -18,6 +18,11 @@
|
||||
#include "util/random.h"
|
||||
#include "util/testutil.h"
|
||||
|
||||
#if defined(_WIN32) && defined(DeleteFile)
|
||||
// See rationale in env.h
|
||||
#undef DeleteFile
|
||||
#endif
|
||||
|
||||
// Comma-separated list of operations to run in the specified order
|
||||
// Actual benchmarks:
|
||||
// fillseq -- write N values in sequential key order in async mode
|
||||
|
@ -23,6 +23,11 @@
|
||||
#include "util/mutexlock.h"
|
||||
#include "util/testutil.h"
|
||||
|
||||
#if defined(_WIN32) && defined(DeleteFile)
|
||||
// See rationale in env.h
|
||||
#undef DeleteFile
|
||||
#endif
|
||||
|
||||
namespace leveldb {
|
||||
|
||||
static std::string RandomString(Random* rnd, int len) {
|
||||
|
@ -25,6 +25,11 @@
|
||||
#include "util/mutexlock.h"
|
||||
#include "util/testutil.h"
|
||||
|
||||
#if defined(_WIN32) && defined(DeleteFile)
|
||||
// See rationale in env.h
|
||||
#undef DeleteFile
|
||||
#endif
|
||||
|
||||
namespace leveldb {
|
||||
|
||||
static const int kValueSize = 1000;
|
||||
|
@ -13,6 +13,11 @@
|
||||
#include "util/logging.h"
|
||||
#include "util/testutil.h"
|
||||
|
||||
#if defined(_WIN32) && defined(DeleteFile)
|
||||
// See rationale in env.h
|
||||
#undef DeleteFile
|
||||
#endif
|
||||
|
||||
namespace leveldb {
|
||||
|
||||
class RecoveryTest : public testing::Test {
|
||||
|
@ -13,6 +13,11 @@
|
||||
#include "leveldb/env.h"
|
||||
#include "util/testutil.h"
|
||||
|
||||
#if defined(_WIN32) && defined(DeleteFile)
|
||||
// See rationale in env.h
|
||||
#undef DeleteFile
|
||||
#endif
|
||||
|
||||
namespace leveldb {
|
||||
|
||||
class MemEnvTest : public testing::Test {
|
||||
|
@ -12,6 +12,11 @@
|
||||
#include "util/mutexlock.h"
|
||||
#include "util/testutil.h"
|
||||
|
||||
#if defined(_WIN32) && defined(DeleteFile)
|
||||
// See rationale in env.h
|
||||
#undef DeleteFile
|
||||
#endif
|
||||
|
||||
namespace leveldb {
|
||||
|
||||
static const int kDelayMicros = 100000;
|
||||
|
Loading…
Reference in New Issue
Block a user