summaryrefslogtreecommitdiff
path: root/jstests/core/where3.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/where3.js')
-rw-r--r--jstests/core/where3.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/jstests/core/where3.js b/jstests/core/where3.js
index 2eb53f82370..633276489a5 100644
--- a/jstests/core/where3.js
+++ b/jstests/core/where3.js
@@ -2,12 +2,16 @@
t = db.where3;
t.drop();
-t.save( { returned_date : 5 } );
-t.save( { returned_date : 6 } );
+t.save({returned_date: 5});
+t.save({returned_date: 6});
-assert.eq( 1, t.find(function(){ return this.returned_date == 5; }).count(), "A" );
-assert.eq( 1, t.find({ $where : "return this.returned_date == 5;" }).count(), "B" );
-assert.eq( 1, t.find({ $where : "this.returned_date == 5;" }).count(), "C" );
-assert.eq( 1, t.find({ $where : "(this.returned_date == 5);" }).count(), "D" );
-assert.eq( 1, t.find({ $where : "((this.returned_date == 5) && (5 == 5));"}).count(), "E" );
-assert.eq( 1, t.find({ $where : "x=this.returned_date;x == 5;" }).count(), "F" );
+assert.eq(1,
+ t.find(function() {
+ return this.returned_date == 5;
+ }).count(),
+ "A");
+assert.eq(1, t.find({$where: "return this.returned_date == 5;"}).count(), "B");
+assert.eq(1, t.find({$where: "this.returned_date == 5;"}).count(), "C");
+assert.eq(1, t.find({$where: "(this.returned_date == 5);"}).count(), "D");
+assert.eq(1, t.find({$where: "((this.returned_date == 5) && (5 == 5));"}).count(), "E");
+assert.eq(1, t.find({$where: "x=this.returned_date;x == 5;"}).count(), "F");