diff options
Diffstat (limited to 'jstests/core/geo_withinquery.js')
-rw-r--r-- | jstests/core/geo_withinquery.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/jstests/core/geo_withinquery.js b/jstests/core/geo_withinquery.js index 3a71608ab6d..7f712ba1e86 100644 --- a/jstests/core/geo_withinquery.js +++ b/jstests/core/geo_withinquery.js @@ -5,15 +5,16 @@ t.drop(); num = 0; for (x = 0; x <= 20; x++) { for (y = 0; y <= 20; y++) { - o = { - _id: num++, - loc: [x, y] - }; + o = {_id: num++, loc: [x, y]}; t.save(o); } } assert.eq(21 * 21 - 1, - t.find({$and: [{loc: {$ne: [0, 0]}}, {loc: {$within: {$box: [[0, 0], [100, 100]]}}}, ]}) - .itcount(), + t.find({ + $and: [ + {loc: {$ne: [0, 0]}}, + {loc: {$within: {$box: [[0, 0], [100, 100]]}}}, + ] + }).itcount(), "UHOH!"); |