diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2017-08-21 15:31:06 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2017-08-25 14:16:10 -0400 |
commit | b19f95495d1df437722e6a0c85ea5ca6f91cdd8b (patch) | |
tree | bbc5dd0a3b5868240cd6c5c97c48408e3170046f /src/mongo/db/pipeline/document_source_match_test.cpp | |
parent | 529d5de71344fda500802fa4a8671c5745ad62fa (diff) | |
download | mongo-b19f95495d1df437722e6a0c85ea5ca6f91cdd8b.tar.gz |
SERVER-29840 Add allowed features bitmask to MatchExpressionParser::parse
Diffstat (limited to 'src/mongo/db/pipeline/document_source_match_test.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_match_test.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mongo/db/pipeline/document_source_match_test.cpp b/src/mongo/db/pipeline/document_source_match_test.cpp index df8a38541aa..c01ae31db9a 100644 --- a/src/mongo/db/pipeline/document_source_match_test.cpp +++ b/src/mongo/db/pipeline/document_source_match_test.cpp @@ -33,8 +33,6 @@ #include "mongo/bson/bsonmisc.h" #include "mongo/bson/bsonobj.h" #include "mongo/bson/json.h" -#include "mongo/db/matcher/extensions_callback_noop.h" -#include "mongo/db/matcher/matcher.h" #include "mongo/db/pipeline/aggregation_context_fixture.h" #include "mongo/db/pipeline/document.h" #include "mongo/db/pipeline/document_source_match.h" @@ -381,8 +379,8 @@ DEATH_TEST_F(DocumentSourceMatchTest, "Invariant failure expression::isPathPrefixOf") { const auto expCtx = getExpCtx(); const auto matchSpec = BSON("a.b" << 1 << "b.c" << 1); - const auto matchExpression = unittest::assertGet( - MatchExpressionParser::parse(matchSpec, ExtensionsCallbackNoop(), expCtx->getCollator())); + const auto matchExpression = + unittest::assertGet(MatchExpressionParser::parse(matchSpec, expCtx->getCollator())); DocumentSourceMatch::descendMatchOnPath(matchExpression.get(), "a", expCtx); } @@ -391,8 +389,8 @@ DEATH_TEST_F(DocumentSourceMatchTest, "Invariant failure node->matchType()") { const auto expCtx = getExpCtx(); const auto matchSpec = BSON("a" << BSON("$elemMatch" << BSON("a.b" << 1))); - const auto matchExpression = unittest::assertGet( - MatchExpressionParser::parse(matchSpec, ExtensionsCallbackNoop(), expCtx->getCollator())); + const auto matchExpression = + unittest::assertGet(MatchExpressionParser::parse(matchSpec, expCtx->getCollator())); BSONObjBuilder out; matchExpression->serialize(&out); DocumentSourceMatch::descendMatchOnPath(matchExpression.get(), "a", expCtx); @@ -406,16 +404,16 @@ DEATH_TEST_F(DocumentSourceMatchTest, "Invariant failure") { const auto expCtx = getExpCtx(); const auto matchSpec = BSON("a" << BSON("$elemMatch" << BSON("$gt" << 0))); - const auto matchExpression = unittest::assertGet( - MatchExpressionParser::parse(matchSpec, ExtensionsCallbackNoop(), expCtx->getCollator())); + const auto matchExpression = + unittest::assertGet(MatchExpressionParser::parse(matchSpec, expCtx->getCollator())); DocumentSourceMatch::descendMatchOnPath(matchExpression.get(), "a", expCtx); } TEST_F(DocumentSourceMatchTest, ShouldMatchCorrectlyAfterDescendingMatch) { const auto expCtx = getExpCtx(); const auto matchSpec = BSON("a.b" << 1 << "a.c" << 1 << "a.d" << 1); - const auto matchExpression = unittest::assertGet( - MatchExpressionParser::parse(matchSpec, ExtensionsCallbackNoop(), expCtx->getCollator())); + const auto matchExpression = + unittest::assertGet(MatchExpressionParser::parse(matchSpec, expCtx->getCollator())); const auto descendedMatch = DocumentSourceMatch::descendMatchOnPath(matchExpression.get(), "a", expCtx); |