diff options
author | Eliot Horowitz <eliot@10gen.com> | 2013-05-08 10:26:44 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2013-05-09 10:16:55 -0400 |
commit | 3893e7ff97d576652756456fafba2936092e15ce (patch) | |
tree | 124d77e989e9bad3264b4111e0570aead5df23a8 /src/mongo/db/matcher/expression_parser_test.cpp | |
parent | f41cc12bf4672528f513fb81f1fab4b4b379ae83 (diff) | |
download | mongo-3893e7ff97d576652756456fafba2936092e15ce.tar.gz |
SERVER-6400 Use an abstraction layer into MatchExpression for different formats
currently BSONObj vs index keys
Diffstat (limited to 'src/mongo/db/matcher/expression_parser_test.cpp')
-rw-r--r-- | src/mongo/db/matcher/expression_parser_test.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/matcher/expression_parser_test.cpp b/src/mongo/db/matcher/expression_parser_test.cpp index 12d9ce553c2..28e53aef3a7 100644 --- a/src/mongo/db/matcher/expression_parser_test.cpp +++ b/src/mongo/db/matcher/expression_parser_test.cpp @@ -32,8 +32,8 @@ namespace mongo { StatusWithMatchExpression result = MatchExpressionParser::parse( query ); ASSERT_TRUE( result.isOK() ); - ASSERT( result.getValue()->matches( BSON( "x" << 2 ) ) ); - ASSERT( !result.getValue()->matches( BSON( "x" << 3 ) ) ); + ASSERT( result.getValue()->matchesBSON( BSON( "x" << 2 ) ) ); + ASSERT( !result.getValue()->matchesBSON( BSON( "x" << 3 ) ) ); } TEST( MatchExpressionParserTest, Multiple1 ) { @@ -41,11 +41,11 @@ namespace mongo { StatusWithMatchExpression result = MatchExpressionParser::parse( query ); ASSERT_TRUE( result.isOK() ); - ASSERT( result.getValue()->matches( BSON( "x" << 5 << "y" << 7 ) ) ); - ASSERT( result.getValue()->matches( BSON( "x" << 5 << "y" << 6 ) ) ); - ASSERT( !result.getValue()->matches( BSON( "x" << 6 << "y" << 7 ) ) ); - ASSERT( !result.getValue()->matches( BSON( "x" << 5 << "y" << 9 ) ) ); - ASSERT( !result.getValue()->matches( BSON( "x" << 5 << "y" << 4 ) ) ); + ASSERT( result.getValue()->matchesBSON( BSON( "x" << 5 << "y" << 7 ) ) ); + ASSERT( result.getValue()->matchesBSON( BSON( "x" << 5 << "y" << 6 ) ) ); + 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 ) ) ); } TEST( AtomicMatchExpressionTest, Simple1 ) { |