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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user