summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/record_store_test_datasize.cpp
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-06-10 18:08:48 -0400
committerAndrew Morrow <acm@mongodb.com>2015-06-10 22:37:49 -0400
commitd7d1fdb75966c684e9a42150e6e9b69c4a10ee08 (patch)
treed28b0767cbd8c1a09535f1676152e7ac57e829ce /src/mongo/db/storage/record_store_test_datasize.cpp
parenta9b6612f5322f916298c19a6728817a1034c6aab (diff)
downloadmongo-d7d1fdb75966c684e9a42150e6e9b69c4a10ee08.tar.gz
SERVER-17308 Replace boost::scoped_ptr<T> with std::unique_ptr<T>
Diffstat (limited to 'src/mongo/db/storage/record_store_test_datasize.cpp')
-rw-r--r--src/mongo/db/storage/record_store_test_datasize.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mongo/db/storage/record_store_test_datasize.cpp b/src/mongo/db/storage/record_store_test_datasize.cpp
index aadcc99acb8..247adb92189 100644
--- a/src/mongo/db/storage/record_store_test_datasize.cpp
+++ b/src/mongo/db/storage/record_store_test_datasize.cpp
@@ -30,7 +30,6 @@
#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"
@@ -40,37 +39,37 @@ using std::stringstream;
namespace mongo {
- using boost::scoped_ptr;
+ using std::unique_ptr;
// Verify that an empty collection takes up no space.
TEST( RecordStoreTestHarness, DataSizeEmpty ) {
- 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() ) );
}
{
- scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
+ unique_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
ASSERT( rs->dataSize( opCtx.get() ) == 0 );
}
}
// Verify that a nonempty collection takes up some space.
TEST( RecordStoreTestHarness, DataSizeNonEmpty ) {
- 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;
@@ -87,12 +86,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->dataSize( opCtx.get() ) > 0 );
}
}