0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

add numberic comparison test MINOR

This commit is contained in:
Aaron 2009-04-06 17:45:29 -04:00
parent 2b97f73722
commit 6458658240

View File

@ -229,6 +229,15 @@ namespace QueryOptimizerTests {
}
};
class Numeric {
public:
void run() {
FieldBoundSet f( "", BSON( "a" << 1 ) );
ASSERT( f.bound( "a" ).lower().woCompare( BSON( "a" << 2.0 ).firstElement() ) < 0 );
ASSERT( f.bound( "a" ).lower().woCompare( BSON( "a" << 0.0 ).firstElement() ) > 0 );
}
};
} // namespace FieldBoundTests
namespace QueryPlanTests {
@ -965,6 +974,7 @@ namespace QueryOptimizerTests {
add< FieldBoundTests::SimplifiedQuery >();
add< FieldBoundTests::QueryPatternTest >();
add< FieldBoundTests::NoWhere >();
add< FieldBoundTests::Numeric >();
add< QueryPlanTests::NoIndex >();
add< QueryPlanTests::SimpleOrder >();
add< QueryPlanTests::MoreIndexThanNeeded >();