summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/sorted_data_interface_test_cursor.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-10-16 09:08:28 -0400
committerEliot Horowitz <eliot@10gen.com>2014-10-16 17:56:42 -0400
commit34cfe32ab4c0751ceb55b607c05dc593c3dd901c (patch)
tree708e7fa2ba33df6a195bbae6d957308c07bbf28d /src/mongo/db/storage/sorted_data_interface_test_cursor.cpp
parent5af2cac9e0de1bf20eba4790ecc3547c679dfd13 (diff)
downloadmongo-34cfe32ab4c0751ceb55b607c05dc593c3dd901c.tar.gz
SERVER-13635: pass whether an index is unique or not down through SortedDataInterface
Diffstat (limited to 'src/mongo/db/storage/sorted_data_interface_test_cursor.cpp')
-rw-r--r--src/mongo/db/storage/sorted_data_interface_test_cursor.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/storage/sorted_data_interface_test_cursor.cpp b/src/mongo/db/storage/sorted_data_interface_test_cursor.cpp
index 3a22f66099a..87583fdcdd8 100644
--- a/src/mongo/db/storage/sorted_data_interface_test_cursor.cpp
+++ b/src/mongo/db/storage/sorted_data_interface_test_cursor.cpp
@@ -38,7 +38,7 @@ namespace mongo {
// Call getDirection() on a forward cursor and verify the result equals +1.
TEST( SortedDataInterface, GetCursorDirection ) {
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
- scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() );
+ scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( false ) );
{
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
@@ -50,7 +50,7 @@ namespace mongo {
// Call getDirection() on a reverse cursor and verify the result equals -1.
TEST( SortedDataInterface, GetCursorDirectionReversed ) {
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
- scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() );
+ scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( false ) );
{
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
@@ -62,7 +62,7 @@ namespace mongo {
// Verify that a forward cursor is positioned at EOF when the index is empty.
TEST( SortedDataInterface, CursorIsEOFWhenEmpty ) {
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
- scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() );
+ scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( false ) );
{
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
@@ -85,7 +85,7 @@ namespace mongo {
// Verify that a reverse cursor is positioned at EOF when the index is empty.
TEST( SortedDataInterface, CursorIsEOFWhenEmptyReversed ) {
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
- scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() );
+ scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( false ) );
{
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
@@ -109,7 +109,7 @@ namespace mongo {
// When a cursor positioned at EOF is advanced, it stays at EOF.
TEST( SortedDataInterface, ExhaustCursor ) {
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
- scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() );
+ scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( false ) );
{
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
@@ -123,7 +123,7 @@ namespace mongo {
WriteUnitOfWork uow( opCtx.get() );
BSONObj key = BSON( "" << i );
DiskLoc loc( 42, i * 2 );
- ASSERT_OK( sorted->insert( opCtx.get(), key, loc, false ) );
+ ASSERT_OK( sorted->insert( opCtx.get(), key, loc, true ) );
uow.commit();
}
}
@@ -155,7 +155,7 @@ namespace mongo {
// When a cursor positioned at EOF is advanced, it stays at EOF.
TEST( SortedDataInterface, ExhaustCursorReversed ) {
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
- scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() );
+ scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( false ) );
{
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
@@ -169,7 +169,7 @@ namespace mongo {
WriteUnitOfWork uow( opCtx.get() );
BSONObj key = BSON( "" << i );
DiskLoc loc( 42, i * 2 );
- ASSERT_OK( sorted->insert( opCtx.get(), key, loc, false ) );
+ ASSERT_OK( sorted->insert( opCtx.get(), key, loc, true ) );
uow.commit();
}
}