diff options
author | leveldb Team <no-reply@google.com> | 2019-12-03 13:15:21 -0800 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2020-01-09 09:17:59 -0800 |
commit | d152b23f3b787f67a0ac3a40498e13831f3778d7 (patch) | |
tree | 1355aa3aa56b9abc890fc001e8f5521ec984b790 /db | |
parent | 58a89bbcb28d02d5704c5fff7aeb6e72f7ca2431 (diff) | |
download | leveldb-d152b23f3b787f67a0ac3a40498e13831f3778d7.tar.gz |
Defend against inclusion of windows.h in tests that invoke
Env::DeleteFile.
PiperOrigin-RevId: 283607548
Diffstat (limited to 'db')
-rw-r--r-- | db/db_test.cc | 5 | ||||
-rw-r--r-- | db/fault_injection_test.cc | 5 | ||||
-rw-r--r-- | db/recovery_test.cc | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/db/db_test.cc b/db/db_test.cc index 1bd5afc..3f41c36 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -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) { diff --git a/db/fault_injection_test.cc b/db/fault_injection_test.cc index db8580c..b2d2adb 100644 --- a/db/fault_injection_test.cc +++ b/db/fault_injection_test.cc @@ -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; diff --git a/db/recovery_test.cc b/db/recovery_test.cc index cf6574e..ea137e6 100644 --- a/db/recovery_test.cc +++ b/db/recovery_test.cc @@ -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 { |