Add tests for intersectsExtent/getExtent

This commit adds tests for `intersectsExtent` of Point, LineString, Polygon,
MultiPoint, MultiLineString, MultiPolygon and GeometryCollection.

It also adds a basic test for `getExtent` of MultiPolygon
This commit is contained in:
Alvin Lindstam
2015-06-05 09:57:36 +02:00
parent bad5a97d20
commit 405d5666e2
7 changed files with 249 additions and 0 deletions
+12
View File
@@ -88,6 +88,18 @@ describe('ol.geom.MultiLineString', function() {
});
describe('#intersectsExtent()', function() {
it('returns true for intersecting part of lineString', function() {
expect(multiLineString.intersectsExtent([1, 2, 2, 3])).to.be(true);
});
it('returns false for non-matching extent within own extent', function() {
expect(multiLineString.intersectsExtent([1, 7, 2, 8])).to.be(false);
});
});
});
describe('construct with 3D coordinates', function() {