Permalink
Browse files

simple null test

  • Loading branch information...
1 parent 2393695 commit 1d1081a32fef759640ff60ec3db8ac72d52dcbba @erh erh committed Oct 8, 2009
Showing with 14 additions and 0 deletions.
  1. +14 −0 jstests/null.js
View
@@ -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.