summaryrefslogtreecommitdiff
path: root/jstests/core/skip1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/skip1.js')
-rw-r--r--jstests/core/skip1.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/jstests/core/skip1.js b/jstests/core/skip1.js
index c856e92cf72..ae8f589d616 100644
--- a/jstests/core/skip1.js
+++ b/jstests/core/skip1.js
@@ -3,16 +3,16 @@
var t = db.jstests_skip1;
-if ( 0 ) { // SERVER-2845
-t.drop();
+if (0) { // SERVER-2845
+ t.drop();
-t.ensureIndex( {a:1} );
-t.save( {a:5} );
-t.save( {a:5} );
-t.save( {a:5} );
+ t.ensureIndex({a: 1});
+ t.save({a: 5});
+ t.save({a: 5});
+ t.save({a: 5});
-assert.eq( 3, t.find( {a:5} ).skip( 2 ).explain().nscanned );
-assert.eq( 1, t.find( {a:5} ).skip( 2 ).explain().nscannedObjects );
+ assert.eq(3, t.find({a: 5}).skip(2).explain().nscanned);
+ assert.eq(1, t.find({a: 5}).skip(2).explain().nscannedObjects);
}
// SERVER-13537: Ensure that combinations of skip and limit don't crash
@@ -21,16 +21,16 @@ t.drop();
for (var i = 0; i < 10; i++) {
t.save({a: i});
}
-assert.eq( 9, t.find().sort({a: 1}).limit(2147483647).skip(1).itcount() );
-assert.eq( 0, t.find().sort({a: 1}).skip(2147483647).limit(1).itcount() );
+assert.eq(9, t.find().sort({a: 1}).limit(2147483647).skip(1).itcount());
+assert.eq(0, t.find().sort({a: 1}).skip(2147483647).limit(1).itcount());
if (!db.getMongo().useReadCommands()) {
// If we're using OP_QUERY/OP_GET_MORE reads rather than find/getMore command, then the skip and
// limit fields must fit inside a 32-bit signed integer.
- assert.throws( function() {
- assert.eq( 0, t.find().sort({a: 1}).skip(2147483648).itcount() );
+ assert.throws(function() {
+ assert.eq(0, t.find().sort({a: 1}).skip(2147483648).itcount());
});
- assert.throws( function() {
- assert.eq( 0, t.find().sort({a: 1}).limit(2147483648).itcount() );
+ assert.throws(function() {
+ assert.eq(0, t.find().sort({a: 1}).limit(2147483648).itcount());
});
}