summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2019-10-24 04:36:44 +0000
committerevergreen <evergreen@mongodb.com>2019-10-24 04:36:44 +0000
commit1485d0a0aa01fc779d3d7c544c091c207c7d438a (patch)
tree48f6f7dcd74e7b5515ba42caad4185cd81abacba
parentae45a26bf49febf006516e484bbc9f421003e0ec (diff)
downloadmongo-1485d0a0aa01fc779d3d7c544c091c207c7d438a.tar.gz
SERVER-42435 fix unit tests
-rw-r--r--src/mongo/db/exec/projection_executor_test.cpp8
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'}")}));
}