Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
simple null test
  • Loading branch information
erh committed Oct 8, 2009
1 parent 2393695 commit 1d1081a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions jstests/null.js
@@ -0,0 +1,14 @@

t = db.null1;
t.drop();

t.save( { x : 1 } );
t.save( { x : null } );

assert.eq( 1 , t.find( { x : null } ).count() , "A" );
assert.eq( 1 , t.find( { x : { $ne : null } } ).count() , "B" );

t.ensureIndex( { x : 1 } );

assert.eq( 1 , t.find( { x : null } ).count() , "C" );
assert.eq( 1 , t.find( { x : { $ne : null } } ).count() , "D" );

0 comments on commit 1d1081a

Please sign in to comment.