diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-05-14 16:35:43 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-05-14 16:35:43 -0400 |
commit | 3247006c76379d26f490727fbea723a3583ba039 (patch) | |
tree | 7cc4e8677415b32e06831bad0c8ece35fbdfc806 /jstests/count.js | |
parent | 2ada81b5232d4b56608e28e4213de954a5fcab0f (diff) | |
download | mongo-3247006c76379d26f490727fbea723a3583ba039.tar.gz |
more tests passing, _id in front
Diffstat (limited to 'jstests/count.js')
-rw-r--r-- | jstests/count.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/jstests/count.js b/jstests/count.js index 129a369f973..5d83502a717 100644 --- a/jstests/count.js +++ b/jstests/count.js @@ -3,21 +3,21 @@ t = db.jstests_count; t.drop(); t.save( { i: 1 } ); t.save( { i: 2 } ); -assert.eq( 1, t.find( { i: 1 } ).count() ); -assert.eq( 1, t.count( { i: 1 } ) ); -assert.eq( 2, t.find().count() ); -assert.eq( 2, t.find( undefined ).count() ); -assert.eq( 2, t.find( null ).count() ); -assert.eq( 2, t.count() ); +assert.eq( 1, t.find( { i: 1 } ).count(), "A" ); +assert.eq( 1, t.count( { i: 1 } ) , "B" ); +assert.eq( 2, t.find().count() , "C" ); +assert.eq( 2, t.find( undefined ).count() , "D" ); +assert.eq( 2, t.find( null ).count() , "E" ); +assert.eq( 2, t.count() , "F" ); t.drop(); t.save( {a:true,b:false} ); t.ensureIndex( {b:1,a:1} ); -assert.eq( 1, t.find( {a:true,b:false} ).count() ); -assert.eq( 1, t.find( {b:false,a:true} ).count() ); +assert.eq( 1, t.find( {a:true,b:false} ).count() , "G" ); +assert.eq( 1, t.find( {b:false,a:true} ).count() , "H" ); t.drop(); t.save( {a:true,b:false} ); t.ensureIndex( {b:1,a:1,c:1} ); -assert.eq( 1, t.find( {a:true,b:false} ).count() ); -assert.eq( 1, t.find( {b:false,a:true} ).count() ); +assert.eq( 1, t.find( {a:true,b:false} ).count() , "I" ); +assert.eq( 1, t.find( {b:false,a:true} ).count() , "J" ); |