summaryrefslogtreecommitdiff
path: root/jstests/core/validate_pseudocommand_ns.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/validate_pseudocommand_ns.js')
-rw-r--r--jstests/core/validate_pseudocommand_ns.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/jstests/core/validate_pseudocommand_ns.js b/jstests/core/validate_pseudocommand_ns.js
index bee314d421d..8faf4f802d8 100644
--- a/jstests/core/validate_pseudocommand_ns.js
+++ b/jstests/core/validate_pseudocommand_ns.js
@@ -4,10 +4,20 @@
if (!db.getMongo().useReadCommands()) {
var inprog = db.$cmd.sys.inprog;
// nToReturn must be 1 or -1.
- assert.doesNotThrow(function() { inprog.find().limit(-1).next(); });
- assert.doesNotThrow(function() { inprog.find().limit(1).next(); });
- assert.throws(function() { inprog.find().limit(0).next(); });
- assert.throws(function() { inprog.find().limit(-2).next(); });
- assert.throws(function() { inprog.find().limit(99).next(); });
+ assert.doesNotThrow(function() {
+ inprog.find().limit(-1).next();
+ });
+ assert.doesNotThrow(function() {
+ inprog.find().limit(1).next();
+ });
+ assert.throws(function() {
+ inprog.find().limit(0).next();
+ });
+ assert.throws(function() {
+ inprog.find().limit(-2).next();
+ });
+ assert.throws(function() {
+ inprog.find().limit(99).next();
+ });
}
})();