aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/util/env_windows_test_helper.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-01-28 16:59:07 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-01-28 16:59:07 +0100
commit20a6babfa9a66f5432ef19c6c433b4357560f853 (patch)
tree0834cbc4054d41dfb8de5ec90143b4415adbc41d /src/leveldb/util/env_windows_test_helper.h
parent2755b2b1092d0286022cf3cc3028e96f6bee2b34 (diff)
parent66480821b36c839ab7615cb9309850015bceadb0 (diff)
downloadbitcoin-20a6babfa9a66f5432ef19c6c433b4357560f853.tar.xz
Update to leveldb upstream using subtree merge
Diffstat (limited to 'src/leveldb/util/env_windows_test_helper.h')
-rw-r--r--src/leveldb/util/env_windows_test_helper.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/leveldb/util/env_windows_test_helper.h b/src/leveldb/util/env_windows_test_helper.h
new file mode 100644
index 0000000000..e6f6020561
--- /dev/null
+++ b/src/leveldb/util/env_windows_test_helper.h
@@ -0,0 +1,25 @@
+// Copyright 2018 (c) The LevelDB Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file. See the AUTHORS file for names of contributors.
+
+#ifndef STORAGE_LEVELDB_UTIL_ENV_WINDOWS_TEST_HELPER_H_
+#define STORAGE_LEVELDB_UTIL_ENV_WINDOWS_TEST_HELPER_H_
+
+namespace leveldb {
+
+class EnvWindowsTest;
+
+// A helper for the Windows Env to facilitate testing.
+class EnvWindowsTestHelper {
+ private:
+ friend class CorruptionTest;
+ friend class EnvWindowsTest;
+
+ // Set the maximum number of read-only files that will be mapped via mmap.
+ // Must be called before creating an Env.
+ static void SetReadOnlyMMapLimit(int limit);
+};
+
+} // namespace leveldb
+
+#endif // STORAGE_LEVELDB_UTIL_ENV_WINDOWS_TEST_HELPER_H_