summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/kv/kv_engine_test_harness.cpp')
-rw-r--r--src/mongo/db/storage/kv/kv_engine_test_harness.cpp47
1 files changed, 23 insertions, 24 deletions
diff --git a/src/mongo/db/storage/kv/kv_engine_test_harness.cpp b/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
index f2438689f8e..36aeefcf2c4 100644
--- a/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
+++ b/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
@@ -30,7 +30,6 @@
#include "mongo/db/storage/kv/kv_engine_test_harness.h"
-#include <boost/scoped_ptr.hpp>
#include "mongo/db/operation_context_noop.h"
#include "mongo/db/index/index_descriptor.h"
@@ -42,7 +41,7 @@
namespace mongo {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::string;
namespace {
@@ -55,12 +54,12 @@ namespace mongo {
}
TEST( KVEngineTestHarness, SimpleRS1 ) {
- scoped_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
+ unique_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
KVEngine* engine = helper->getEngine();
ASSERT( engine );
string ns = "a.b";
- scoped_ptr<RecordStore> rs;
+ unique_ptr<RecordStore> rs;
{
MyOperationContext opCtx( engine );
ASSERT_OK( engine->createRecordStore( &opCtx, ns, ns, CollectionOptions() ) );
@@ -94,7 +93,7 @@ namespace mongo {
}
TEST( KVEngineTestHarness, Restart1 ) {
- scoped_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
+ unique_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
KVEngine* engine = helper->getEngine();
ASSERT( engine );
@@ -103,7 +102,7 @@ namespace mongo {
// 'loc' holds location of "abc" and is referenced after restarting engine.
RecordId loc;
{
- scoped_ptr<RecordStore> rs;
+ unique_ptr<RecordStore> rs;
{
MyOperationContext opCtx( engine );
ASSERT_OK( engine->createRecordStore( &opCtx, ns, ns, CollectionOptions() ) );
@@ -129,7 +128,7 @@ namespace mongo {
engine = helper->restartEngine();
{
- scoped_ptr<RecordStore> rs;
+ unique_ptr<RecordStore> rs;
MyOperationContext opCtx( engine );
rs.reset( engine->getRecordStore( &opCtx, ns, ns, CollectionOptions() ) );
ASSERT_EQUALS( string("abc"), rs->dataFor( &opCtx, loc ).data() );
@@ -139,13 +138,13 @@ namespace mongo {
TEST( KVEngineTestHarness, SimpleSorted1 ) {
- scoped_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
+ unique_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
KVEngine* engine = helper->getEngine();
ASSERT( engine );
string ident = "abc";
IndexDescriptor desc( NULL, "", BSON( "key" << BSON( "a" << 1 ) ) );
- scoped_ptr<SortedDataInterface> sorted;
+ unique_ptr<SortedDataInterface> sorted;
{
MyOperationContext opCtx( engine );
ASSERT_OK( engine->createSortedDataInterface( &opCtx, ident, &desc ) );
@@ -168,11 +167,11 @@ namespace mongo {
}
TEST( KVCatalogTest, Coll1 ) {
- scoped_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
+ unique_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
KVEngine* engine = helper->getEngine();
- scoped_ptr<RecordStore> rs;
- scoped_ptr<KVCatalog> catalog;
+ unique_ptr<RecordStore> rs;
+ unique_ptr<KVCatalog> catalog;
{
MyOperationContext opCtx( engine );
WriteUnitOfWork uow( &opCtx );
@@ -212,11 +211,11 @@ namespace mongo {
TEST( KVCatalogTest, Idx1 ) {
- scoped_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
+ unique_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
KVEngine* engine = helper->getEngine();
- scoped_ptr<RecordStore> rs;
- scoped_ptr<KVCatalog> catalog;
+ unique_ptr<RecordStore> rs;
+ unique_ptr<KVCatalog> catalog;
{
MyOperationContext opCtx( engine );
WriteUnitOfWork uow( &opCtx );
@@ -284,11 +283,11 @@ namespace mongo {
}
TEST( KVCatalogTest, DirectoryPerDb1 ) {
- scoped_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
+ unique_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
KVEngine* engine = helper->getEngine();
- scoped_ptr<RecordStore> rs;
- scoped_ptr<KVCatalog> catalog;
+ unique_ptr<RecordStore> rs;
+ unique_ptr<KVCatalog> catalog;
{
MyOperationContext opCtx( engine );
WriteUnitOfWork uow( &opCtx );
@@ -326,11 +325,11 @@ namespace mongo {
}
TEST( KVCatalogTest, Split1 ) {
- scoped_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
+ unique_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
KVEngine* engine = helper->getEngine();
- scoped_ptr<RecordStore> rs;
- scoped_ptr<KVCatalog> catalog;
+ unique_ptr<RecordStore> rs;
+ unique_ptr<KVCatalog> catalog;
{
MyOperationContext opCtx( engine );
WriteUnitOfWork uow( &opCtx );
@@ -368,11 +367,11 @@ namespace mongo {
}
TEST( KVCatalogTest, DirectoryPerAndSplit1 ) {
- scoped_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
+ unique_ptr<KVHarnessHelper> helper( KVHarnessHelper::create() );
KVEngine* engine = helper->getEngine();
- scoped_ptr<RecordStore> rs;
- scoped_ptr<KVCatalog> catalog;
+ unique_ptr<RecordStore> rs;
+ unique_ptr<KVCatalog> catalog;
{
MyOperationContext opCtx( engine );
WriteUnitOfWork uow( &opCtx );