diff options
Diffstat (limited to 'jstests/aggregation/bugs/server6531.js')
-rw-r--r-- | jstests/aggregation/bugs/server6531.js | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/jstests/aggregation/bugs/server6531.js b/jstests/aggregation/bugs/server6531.js index 6cd74c104be..7d117ce6905 100644 --- a/jstests/aggregation/bugs/server6531.js +++ b/jstests/aggregation/bugs/server6531.js @@ -3,16 +3,20 @@ c = db.s6531; c.drop(); -for (var x=0; x < 10; x++) { - for (var y=0; y < 10; y++) { - c.insert({loc: [x,y]}); +for (var x = 0; x < 10; x++) { + for (var y = 0; y < 10; y++) { + c.insert({loc: [x, y]}); } } function test(variant) { - query = {loc: {$within: {$center: [[5,5], 3]}}}; - sort = {_id: 1}; - aggOut = c.aggregate({$match:query}, {$sort: sort}); + query = { + loc: {$within: {$center: [[5, 5], 3]}} + }; + sort = { + _id: 1 + }; + aggOut = c.aggregate({$match: query}, {$sort: sort}); cursor = c.find(query).sort(sort); assert.eq(aggOut.toArray(), cursor.toArray()); @@ -20,9 +24,9 @@ function test(variant) { test("no index"); -c.ensureIndex({loc:"2d"}); +c.ensureIndex({loc: "2d"}); test("2d index"); -c.dropIndex({loc:"2d"}); -c.ensureIndex({loc:"2dsphere"}); +c.dropIndex({loc: "2d"}); +c.ensureIndex({loc: "2dsphere"}); test("2dsphere index"); |