From 5903e7a1125cacaa1d44367b5b84fe9208e42884 Mon Sep 17 00:00:00 2001 From: Victor Costan Date: Fri, 10 Jan 2020 10:45:16 -0800 Subject: [PATCH] Remove Windows workarounds in some tests. leveldb::Env::DeleteFile was replaced with leveldb::Env::RemoveFile in all tests. This allows us to remove workarounds for windows.h #defining DeleteFile. PiperOrigin-RevId: 289121105 --- benchmarks/db_bench.cc | 5 ----- db/db_test.cc | 5 ----- db/fault_injection_test.cc | 5 ----- db/recovery_test.cc | 5 ----- helpers/memenv/memenv_test.cc | 5 ----- util/env_test.cc | 5 ----- 6 files changed, 30 deletions(-) diff --git a/benchmarks/db_bench.cc b/benchmarks/db_bench.cc index 03da9d8..82ed892 100644 --- a/benchmarks/db_bench.cc +++ b/benchmarks/db_bench.cc @@ -18,11 +18,6 @@ #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 diff --git a/db/db_test.cc b/db/db_test.cc index 2ee6761..8cd90f3 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -23,11 +23,6 @@ #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 60e4631..8f2b647 100644 --- a/db/fault_injection_test.cc +++ b/db/fault_injection_test.cc @@ -25,11 +25,6 @@ #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 04b39ae..e5cc916 100644 --- a/db/recovery_test.cc +++ b/db/recovery_test.cc @@ -13,11 +13,6 @@ #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 { diff --git a/helpers/memenv/memenv_test.cc b/helpers/memenv/memenv_test.cc index 93186ab..3f03cb6 100644 --- a/helpers/memenv/memenv_test.cc +++ b/helpers/memenv/memenv_test.cc @@ -13,11 +13,6 @@ #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 { diff --git a/util/env_test.cc b/util/env_test.cc index 223090e..491ef43 100644 --- a/util/env_test.cc +++ b/util/env_test.cc @@ -12,11 +12,6 @@ #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;