diff options
Diffstat (limited to 'src/mongo/db/storage/record_store_test_storagesize.cpp')
-rw-r--r-- | src/mongo/db/storage/record_store_test_storagesize.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mongo/db/storage/record_store_test_storagesize.cpp b/src/mongo/db/storage/record_store_test_storagesize.cpp index 9f5ec9163cf..a0d5cfab024 100644 --- a/src/mongo/db/storage/record_store_test_storagesize.cpp +++ b/src/mongo/db/storage/record_store_test_storagesize.cpp @@ -30,12 +30,11 @@ #include "mongo/db/storage/record_store_test_harness.h" -#include <boost/scoped_ptr.hpp> #include "mongo/db/storage/record_store.h" #include "mongo/unittest/unittest.h" -using boost::scoped_ptr; +using std::unique_ptr; using std::string; using std::stringstream; @@ -43,17 +42,17 @@ namespace mongo { // Verify that a nonempty collection maybe takes up some space on disk. TEST( RecordStoreTestHarness, StorageSizeNonEmpty ) { - scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() ); - scoped_ptr<RecordStore> rs( harnessHelper->newNonCappedRecordStore() ); + unique_ptr<HarnessHelper> harnessHelper( newHarnessHelper() ); + unique_ptr<RecordStore> rs( harnessHelper->newNonCappedRecordStore() ); { - scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); + unique_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); ASSERT_EQUALS( 0, rs->numRecords( opCtx.get() ) ); } int nToInsert = 10; for ( int i = 0; i < nToInsert; i++ ) { - scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); + unique_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); { stringstream ss; ss << "record " << i; @@ -70,12 +69,12 @@ namespace mongo { } { - scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); + unique_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); ASSERT_EQUALS( nToInsert, rs->numRecords( opCtx.get() ) ); } { - scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); + unique_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); ASSERT( rs->storageSize( opCtx.get(), NULL ) >= 0 ); } } |