diff options
Diffstat (limited to 'src/mongo/db/matcher/expression_parser_test.cpp')
-rw-r--r-- | src/mongo/db/matcher/expression_parser_test.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/matcher/expression_parser_test.cpp b/src/mongo/db/matcher/expression_parser_test.cpp index 0512f83499b..291c3465c8f 100644 --- a/src/mongo/db/matcher/expression_parser_test.cpp +++ b/src/mongo/db/matcher/expression_parser_test.cpp @@ -46,6 +46,8 @@ namespace mongo { ASSERT( result.getValue()->matchesBSON( BSON( "x" << 2 ) ) ); ASSERT( !result.getValue()->matchesBSON( BSON( "x" << 3 ) ) ); + + delete result.getValue(); } TEST( MatchExpressionParserTest, Multiple1 ) { @@ -58,16 +60,20 @@ namespace mongo { 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 ); |