diff options
Diffstat (limited to 'jstests/core/geo_box1.js')
-rw-r--r-- | jstests/core/geo_box1.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/core/geo_box1.js b/jstests/core/geo_box1.js index 45e9aab9118..b1949063568 100644 --- a/jstests/core/geo_box1.js +++ b/jstests/core/geo_box1.js @@ -5,25 +5,25 @@ 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); } } t.ensureIndex({loc: "2d"}); -searches = [[[1, 2], [4, 5]], [[1, 1], [2, 2]], [[0, 2], [4, 5]], [[1, 1], [2, 8]], ]; +searches = [ + [[1, 2], [4, 5]], + [[1, 1], [2, 2]], + [[0, 2], [4, 5]], + [[1, 1], [2, 8]], +]; for (i = 0; i < searches.length; i++) { b = searches[i]; // printjson( b ); - q = { - loc: {$within: {$box: b}} - }; + q = {loc: {$within: {$box: b}}}; numWanetd = (1 + b[1][0] - b[0][0]) * (1 + b[1][1] - b[0][1]); assert.eq(numWanetd, t.find(q).itcount(), "itcount: " + tojson(q)); printjson(t.find(q).explain()); |