diff options
author | Eliot Horowitz <eliot@10gen.com> | 2013-05-06 11:22:54 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2013-05-06 11:22:54 -0400 |
commit | ed3efe444510137cc45e11188e23680656e22ead (patch) | |
tree | dc1d75a66e0f7bb1112adccde2994957845a6f76 /src/mongo/db/matcher/expression_parser_test.cpp | |
parent | d6a2d8027f1cbc684d960b8f522e3ffb4043d6d2 (diff) | |
download | mongo-ed3efe444510137cc45e11188e23680656e22ead.tar.gz |
SERVER-6400: MatchExpression version of Matcher code complete.
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 f7ee08f3da0..12d9ce553c2 100644 --- a/src/mongo/db/matcher/expression_parser_test.cpp +++ b/src/mongo/db/matcher/expression_parser_test.cpp @@ -48,6 +48,12 @@ namespace mongo { ASSERT( !result.getValue()->matches( BSON( "x" << 5 << "y" << 4 ) ) ); } + TEST( AtomicMatchExpressionTest, Simple1 ) { + BSONObj query = BSON( "x" << 5 << "$atomic" << BSON( "$gt" << 5 << "$lt" << 8 ) ); + StatusWithMatchExpression result = MatchExpressionParser::parse( query ); + ASSERT_TRUE( result.isOK() ); + } + StatusWith<int> fib( int n ) { if ( n < 0 ) return StatusWith<int>( ErrorCodes::BadValue, "paramter to fib has to be >= 0" ); if ( n <= 1 ) return StatusWith<int>( 1 ); |