summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/index_bounds_builder_test.cpp
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2017-09-14 16:40:46 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2017-09-29 09:30:56 -0400
commite0a505e2a8bfe59d8bdfc4e5a25aef4861d58fcf (patch)
tree237c46d1e4fd1080ac58b890485fb6197d53484c /src/mongo/db/query/index_bounds_builder_test.cpp
parent026b5f6f38c883c48d063ac8ee736f7330227281 (diff)
downloadmongo-e0a505e2a8bfe59d8bdfc4e5a25aef4861d58fcf.tar.gz
SERVER-30731 MatchExpressionParser::parse() should require an ExpressionContext
Diffstat (limited to 'src/mongo/db/query/index_bounds_builder_test.cpp')
-rw-r--r--src/mongo/db/query/index_bounds_builder_test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/query/index_bounds_builder_test.cpp b/src/mongo/db/query/index_bounds_builder_test.cpp
index ec85f567ae1..f7d0e23794e 100644
--- a/src/mongo/db/query/index_bounds_builder_test.cpp
+++ b/src/mongo/db/query/index_bounds_builder_test.cpp
@@ -35,6 +35,7 @@
#include "mongo/db/json.h"
#include "mongo/db/matcher/expression_parser.h"
+#include "mongo/db/pipeline/expression_context_for_test.h"
#include "mongo/db/query/collation/collator_interface_mock.h"
#include "mongo/db/query/expression_index.h"
#include "mongo/unittest/unittest.h"
@@ -58,8 +59,8 @@ double NaN = numeric_limits<double>::quiet_NaN();
* Utility function to create MatchExpression
*/
MatchExpression* parseMatchExpression(const BSONObj& obj) {
- const CollatorInterface* collator = nullptr;
- StatusWithMatchExpression status = MatchExpressionParser::parse(obj, collator);
+ boost::intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest());
+ StatusWithMatchExpression status = MatchExpressionParser::parse(obj, std::move(expCtx));
ASSERT_TRUE(status.isOK());
MatchExpression* expr(status.getValue().release());
return expr;