summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_parser_test.cpp
diff options
context:
space:
mode:
authorQingyang Chen <qingyang.chen@10gen.com>2015-06-19 17:21:47 -0400
committerQingyang Chen <qingyang.chen@10gen.com>2015-07-06 18:00:21 -0400
commit32f04880f175fd3a3ce848ca074be72adc6d638c (patch)
tree040ef2400f925fe39878bdd6b605bce9a83c8290 /src/mongo/db/matcher/expression_parser_test.cpp
parent8567716e593426868f161a7e5e822486ca93336c (diff)
downloadmongo-32f04880f175fd3a3ce848ca074be72adc6d638c.tar.gz
SERVER-16889 StatusWithMatchExpression replace ME* with unique_ptr<ME>
Diffstat (limited to 'src/mongo/db/matcher/expression_parser_test.cpp')
-rw-r--r--src/mongo/db/matcher/expression_parser_test.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/mongo/db/matcher/expression_parser_test.cpp b/src/mongo/db/matcher/expression_parser_test.cpp
index 5af0c7a2843..4927cd29229 100644
--- a/src/mongo/db/matcher/expression_parser_test.cpp
+++ b/src/mongo/db/matcher/expression_parser_test.cpp
@@ -46,8 +46,6 @@ TEST(MatchExpressionParserTest, SimpleEQ1) {
ASSERT(result.getValue()->matchesBSON(BSON("x" << 2)));
ASSERT(!result.getValue()->matchesBSON(BSON("x" << 3)));
-
- delete result.getValue();
}
TEST(MatchExpressionParserTest, Multiple1) {
@@ -60,20 +58,16 @@ TEST(MatchExpressionParserTest, Multiple1) {
ASSERT(!result.getValue()->matchesBSON(BSON("x" << 6 << "y" << 7)));
ASSERT(!result.getValue()->matchesBSON(BSON("x" << 5 << "y" << 9)));
ASSERT(!result.getValue()->matchesBSON(BSON("x" << 5 << "y" << 4)));
-
- delete result.getValue();
}
TEST(AtomicMatchExpressionTest, Simple1) {
BSONObj query = BSON("x" << 5 << "$atomic" << BSON("$gt" << 5 << "$lt" << 8));
StatusWithMatchExpression result = MatchExpressionParser::parse(query);
ASSERT_TRUE(result.isOK());
- delete result.getValue();
query = BSON("x" << 5 << "$isolated" << 1);
result = MatchExpressionParser::parse(query);
ASSERT_TRUE(result.isOK());
- delete result.getValue();
query = BSON("x" << 5 << "y" << BSON("$isolated" << 1));
result = MatchExpressionParser::parse(query);