summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/matcher/expression_test.cpp')
-rw-r--r--src/mongo/db/matcher/expression_test.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/mongo/db/matcher/expression_test.cpp b/src/mongo/db/matcher/expression_test.cpp
index 1ca7eefa856..90d50cf5f47 100644
--- a/src/mongo/db/matcher/expression_test.cpp
+++ b/src/mongo/db/matcher/expression_test.cpp
@@ -47,8 +47,7 @@ TEST(MatchExpressionTest, Parse1) {
TEST(LeafMatchExpressionTest, Equal1) {
BSONObj temp = BSON("x" << 5);
- const CollatorInterface* collator = nullptr;
- EqualityMatchExpression e(collator);
+ EqualityMatchExpression e;
e.init("x", temp["x"]);
ASSERT_TRUE(e.matchesBSON(fromjson("{ x : 5 }")));
@@ -67,8 +66,7 @@ TEST(LeafMatchExpressionTest, Comp1) {
BSONObj temp = BSON("x" << 5);
{
- const CollatorInterface* collator = nullptr;
- LTEMatchExpression e(collator);
+ LTEMatchExpression e;
e.init("x", temp["x"]);
ASSERT_TRUE(e.matchesBSON(fromjson("{ x : 5 }")));
ASSERT_TRUE(e.matchesBSON(fromjson("{ x : 4 }")));
@@ -77,8 +75,7 @@ TEST(LeafMatchExpressionTest, Comp1) {
}
{
- const CollatorInterface* collator = nullptr;
- LTMatchExpression e(collator);
+ LTMatchExpression e;
e.init("x", temp["x"]);
ASSERT_FALSE(e.matchesBSON(fromjson("{ x : 5 }")));
ASSERT_TRUE(e.matchesBSON(fromjson("{ x : 4 }")));
@@ -87,8 +84,7 @@ TEST(LeafMatchExpressionTest, Comp1) {
}
{
- const CollatorInterface* collator = nullptr;
- GTEMatchExpression e(collator);
+ GTEMatchExpression e;
e.init("x", temp["x"]);
ASSERT_TRUE(e.matchesBSON(fromjson("{ x : 5 }")));
ASSERT_FALSE(e.matchesBSON(fromjson("{ x : 4 }")));
@@ -97,8 +93,7 @@ TEST(LeafMatchExpressionTest, Comp1) {
}
{
- const CollatorInterface* collator = nullptr;
- GTMatchExpression e(collator);
+ GTMatchExpression e;
e.init("x", temp["x"]);
ASSERT_FALSE(e.matchesBSON(fromjson("{ x : 5 }")));
ASSERT_FALSE(e.matchesBSON(fromjson("{ x : 4 }")));