diff options
author | Ian Boros <ian.boros@mongodb.com> | 2019-10-24 04:36:44 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-24 04:36:44 +0000 |
commit | 1485d0a0aa01fc779d3d7c544c091c207c7d438a (patch) | |
tree | 48f6f7dcd74e7b5515ba42caad4185cd81abacba | |
parent | ae45a26bf49febf006516e484bbc9f421003e0ec (diff) | |
download | mongo-1485d0a0aa01fc779d3d7c544c091c207c7d438a.tar.gz |
SERVER-42435 fix unit tests
-rw-r--r-- | src/mongo/db/exec/projection_executor_test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/exec/projection_executor_test.cpp b/src/mongo/db/exec/projection_executor_test.cpp index 0caa4f3d007..bd5e77c56d7 100644 --- a/src/mongo/db/exec/projection_executor_test.cpp +++ b/src/mongo/db/exec/projection_executor_test.cpp @@ -152,14 +152,14 @@ TEST_F(ProjectionExecutorTest, CanProjectFindElemMatch) { const BSONObj obj = fromjson("{a: [{b: 3, c: 1}, {b: 1, c: 2}, {b: 1, c: 3}]}"); { - auto proj = parseWithDefaultPolicies(fromjson("{a: {$elemMatch: {b: 1}}}")); + auto proj = parseWithFindFeaturesEnabled(fromjson("{a: {$elemMatch: {b: 1}}}")); auto executor = buildProjectionExecutor(getExpCtx(), &proj, {}); ASSERT_DOCUMENT_EQ(Document{fromjson("{a: [{b: 1, c: 2}]}")}, executor->applyTransformation(Document{obj})); } { - auto proj = parseWithDefaultPolicies(fromjson("{a: {$elemMatch: {b: 1, c: 3}}}")); + auto proj = parseWithFindFeaturesEnabled(fromjson("{a: {$elemMatch: {b: 1, c: 3}}}")); auto executor = buildProjectionExecutor(getExpCtx(), &proj, {}); ASSERT_DOCUMENT_EQ(Document{fromjson("{a: [{b: 1, c: 3}]}")}, executor->applyTransformation(Document{obj})); @@ -170,7 +170,7 @@ TEST_F(ProjectionExecutorTest, ElemMatchRespectsCollator) { CollatorInterfaceMock collator(CollatorInterfaceMock::MockType::kReverseString); getExpCtx()->setCollator(&collator); - auto proj = parseWithDefaultPolicies(fromjson("{a: {$elemMatch: {$gte: 'abc'}}}")); + auto proj = parseWithFindFeaturesEnabled(fromjson("{a: {$elemMatch: {$gte: 'abc'}}}")); auto executor = buildProjectionExecutor(getExpCtx(), &proj, {}); @@ -191,7 +191,7 @@ TEST_F(ProjectionExecutorTest, CanProjectFindSliceWithInclusion) { auto proj = parseWithFindFeaturesEnabled(fromjson("{'a.b': {$slice: [1,2]}, c: 1}")); auto executor = buildProjectionExecutor(getExpCtx(), &proj, {}); ASSERT_DOCUMENT_EQ( - Document{fromjson("{a: {b: [1,2,3]}, c: 'abc'}")}, + Document{fromjson("{a: {b: [2,3]}, c: 'abc'}")}, executor->applyTransformation(Document{fromjson("{a: {b: [1,2,3]}, c: 'abc'}")})); } |