diff options
Diffstat (limited to 'jstests/mod1.js')
-rw-r--r-- | jstests/mod1.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/mod1.js b/jstests/mod1.js index c77b5091e89..91329b7733a 100644 --- a/jstests/mod1.js +++ b/jstests/mod1.js @@ -5,6 +5,7 @@ t.drop(); t.save( { a : 1 } ); t.save( { a : 2 } ); t.save( { a : 11 } ); +t.save( { a : 20 } ); assert.eq( 2 , t.find( "this.a % 10 == 1" ).itcount() , "A" ); assert.eq( 2 , t.find( { a : { $mod : [ 10 , 1 ] } } ).itcount() , "B" ); @@ -14,3 +15,7 @@ t.ensureIndex( { a : 1 } ); assert.eq( 2 , t.find( "this.a % 10 == 1" ).itcount() , "C" ); assert.eq( 2 , t.find( { a : { $mod : [ 10 , 1 ] } } ).itcount() , "D" ); +assert.eq( 1 , t.find( "this.a % 10 == 0" ).itcount() , "E" ); +assert.eq( 1 , t.find( { a : { $mod : [ 10 , 0 ] } } ).itcount() , "F" ); + + |