diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-05-28 17:55:12 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-05-28 17:55:12 -0400 |
commit | 6dcdd23dd37ef12c87e71cf59ef01cd82432efe0 (patch) | |
tree | c8cfb5acb62c80f375bc37e7d4350382deea6a37 /jstests/core/geo_or.js | |
parent | d4ac5673ea3f6cef4ce9dbcec90e31813997a528 (diff) | |
download | mongo-6dcdd23dd37ef12c87e71cf59ef01cd82432efe0.tar.gz |
SERVER-23971 Clang-Format code
Diffstat (limited to 'jstests/core/geo_or.js')
-rw-r--r-- | jstests/core/geo_or.js | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/jstests/core/geo_or.js b/jstests/core/geo_or.js index 20eb7b7dce1..341ce32d397 100644 --- a/jstests/core/geo_or.js +++ b/jstests/core/geo_or.js @@ -30,54 +30,54 @@ assert.throws(function() { assert.eq(2, t.find({ - $or: [ - {loc: {$geoWithin: {$centerSphere: [p, 10]}}}, - {loc: {$geoWithin: {$centerSphere: [p, 10]}}} - ] - }).itcount(), + $or: [ + {loc: {$geoWithin: {$centerSphere: [p, 10]}}}, + {loc: {$geoWithin: {$centerSphere: [p, 10]}}} + ] + }).itcount(), 'multiple $geoWithin clauses not supported by $or. index type: ' + indexname); +assert.eq( + 2, + t.find({ + $or: [ + {loc: {$geoIntersects: {$geometry: {type: 'LineString', coordinates: [p, q]}}}}, + { + loc: { + $geoIntersects: + {$geometry: {type: 'LineString', coordinates: [[0, 0], [1, 1]]}} + } + } + ] + }).itcount(), + 'multiple $geoIntersects LineString clauses not supported by $or. index type: ' + indexname); assert.eq(2, t.find({ - $or: [ - {loc: {$geoIntersects: {$geometry: {type: 'LineString', coordinates: [p, q]}}}}, - { - loc: { - $geoIntersects: - {$geometry: {type: 'LineString', coordinates: [[0, 0], [1, 1]]}} - } - } - ] - }).itcount(), - 'multiple $geoIntersects LineString clauses not supported by $or. index type: ' + - indexname); -assert.eq(2, - t.find({ - $or: [ - {loc: {$geoIntersects: {$geometry: {type: 'Point', coordinates: p}}}}, - {loc: {$geoIntersects: {$geometry: {type: 'Point', coordinates: q}}}} - ] - }).itcount(), + $or: [ + {loc: {$geoIntersects: {$geometry: {type: 'Point', coordinates: p}}}}, + {loc: {$geoIntersects: {$geometry: {type: 'Point', coordinates: q}}}} + ] + }).itcount(), 'multiple $geoIntersects Point clauses not supported by $or. index type: ' + indexname); assert.eq( 2, t.find({ - $or: [ - { - loc: { - $geoIntersects: - {$geometry: {type: 'Polygon', coordinates: [[[0, 0], p, q, [0, 0]]]}} - } - }, - { - loc: { - $geoIntersects: { - $geometry: - {type: 'Polygon', coordinates: [[[0, 0], [1, 1], [0, 1], [0, 0]]]} - } - } - } - ] - }).itcount(), + $or: [ + { + loc: { + $geoIntersects: + {$geometry: {type: 'Polygon', coordinates: [[[0, 0], p, q, [0, 0]]]}} + } + }, + { + loc: { + $geoIntersects: { + $geometry: + {type: 'Polygon', coordinates: [[[0, 0], [1, 1], [0, 1], [0, 0]]]} + } + } + } + ] + }).itcount(), 'multiple $geoIntersects Polygon clauses not supported by $or. index type: ' + indexname); t.dropIndexes(); @@ -88,9 +88,9 @@ t.ensureIndex({loc: indexname}); assert.eq(2, t.find({ - $or: [ - {loc: {$geoWithin: {$centerSphere: [p, 10]}}}, - {loc: {$geoWithin: {$centerSphere: [p, 10]}}} - ] - }).itcount(), + $or: [ + {loc: {$geoWithin: {$centerSphere: [p, 10]}}}, + {loc: {$geoWithin: {$centerSphere: [p, 10]}}} + ] + }).itcount(), 'multiple $geoWithin clauses not supported by $or. index type: ' + indexname); |