summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp')
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp54
1 files changed, 23 insertions, 31 deletions
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
index 23f649bfcaa..1272ea4d080 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
@@ -35,40 +35,32 @@
namespace mongo {
- using std::unique_ptr;
+using std::unique_ptr;
- class MyHarnessHelper final : public HarnessHelper {
- public:
- MyHarnessHelper()
- : _recordStore("a.b"),
- _order(Ordering::make(BSONObj())) {
- }
+class MyHarnessHelper final : public HarnessHelper {
+public:
+ MyHarnessHelper() : _recordStore("a.b"), _order(Ordering::make(BSONObj())) {}
- std::unique_ptr<SortedDataInterface> newSortedDataInterface(bool unique) final {
- std::unique_ptr<SortedDataInterface> sorted(getMMAPV1Interface(&_headManager,
- &_recordStore,
- &_cursorRegistry,
- _order,
- "a_1",
- 1));
- OperationContextNoop op;
- massertStatusOK(sorted->initAsEmpty(&op));
- return sorted;
- }
-
- std::unique_ptr<RecoveryUnit> newRecoveryUnit() final {
- return stdx::make_unique<HeapRecordStoreBtreeRecoveryUnit>();
- }
-
- private:
- TestHeadManager _headManager;
- HeapRecordStoreBtree _recordStore;
- SavedCursorRegistry _cursorRegistry;
- Ordering _order;
- };
+ std::unique_ptr<SortedDataInterface> newSortedDataInterface(bool unique) final {
+ std::unique_ptr<SortedDataInterface> sorted(
+ getMMAPV1Interface(&_headManager, &_recordStore, &_cursorRegistry, _order, "a_1", 1));
+ OperationContextNoop op;
+ massertStatusOK(sorted->initAsEmpty(&op));
+ return sorted;
+ }
- std::unique_ptr<HarnessHelper> newHarnessHelper() {
- return stdx::make_unique<MyHarnessHelper>();
+ std::unique_ptr<RecoveryUnit> newRecoveryUnit() final {
+ return stdx::make_unique<HeapRecordStoreBtreeRecoveryUnit>();
}
+private:
+ TestHeadManager _headManager;
+ HeapRecordStoreBtree _recordStore;
+ SavedCursorRegistry _cursorRegistry;
+ Ordering _order;
+};
+
+std::unique_ptr<HarnessHelper> newHarnessHelper() {
+ return stdx::make_unique<MyHarnessHelper>();
+}
}