diff options
Diffstat (limited to 'jstests/core/index_check7.js')
-rw-r--r-- | jstests/core/index_check7.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/jstests/core/index_check7.js b/jstests/core/index_check7.js index f8020d76143..fda248db467 100644 --- a/jstests/core/index_check7.js +++ b/jstests/core/index_check7.js @@ -2,14 +2,13 @@ t = db.index_check7; t.drop(); -for ( var i=0; i<100; i++ ) - t.save( { x : i } ); +for (var i = 0; i < 100; i++) + t.save({x: i}); -t.ensureIndex( { x : 1 } ); -assert.eq( 1 , t.find( { x : 27 } ).explain(true).executionStats.totalKeysExamined , "A" ); +t.ensureIndex({x: 1}); +assert.eq(1, t.find({x: 27}).explain(true).executionStats.totalKeysExamined, "A"); -t.ensureIndex( { x : -1 } ); -assert.eq( 1 , t.find( { x : 27 } ).explain(true).executionStats.totalKeysExamined , "B" ); +t.ensureIndex({x: -1}); +assert.eq(1, t.find({x: 27}).explain(true).executionStats.totalKeysExamined, "B"); -assert.eq( 40 , t.find( { x : { $gt : 59 } } ).explain(true) - .executionStats.totalKeysExamined , "C" ); +assert.eq(40, t.find({x: {$gt: 59}}).explain(true).executionStats.totalKeysExamined, "C"); |