Removed tests for simplified geometry cache
This commit is contained in:
@@ -336,19 +336,6 @@ describe('ol.geom.LineString', function() {
|
|||||||
[[0, 0], [3, 3], [5, 1], [7, 5]]);
|
[[0, 0], [3, 3], [5, 1], [7, 5]]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('caches by resolution', function() {
|
|
||||||
const simplifiedGeometry1 = lineString.getSimplifiedGeometry(1);
|
|
||||||
const simplifiedGeometry2 = lineString.getSimplifiedGeometry(1);
|
|
||||||
expect(simplifiedGeometry1).to.be(simplifiedGeometry2);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('invalidates the cache when the geometry changes', function() {
|
|
||||||
const simplifiedGeometry1 = lineString.getSimplifiedGeometry(1);
|
|
||||||
lineString.setCoordinates(lineString.getCoordinates());
|
|
||||||
const simplifiedGeometry2 = lineString.getSimplifiedGeometry(1);
|
|
||||||
expect(simplifiedGeometry1).not.to.be(simplifiedGeometry2);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('remembers the minimum squared tolerance', function() {
|
it('remembers the minimum squared tolerance', function() {
|
||||||
sinon.spy(lineString, 'getSimplifiedGeometryInternal');
|
sinon.spy(lineString, 'getSimplifiedGeometryInternal');
|
||||||
const simplifiedGeometry1 = lineString.getSimplifiedGeometry(0.05);
|
const simplifiedGeometry1 = lineString.getSimplifiedGeometry(0.05);
|
||||||
|
|||||||
@@ -496,15 +496,6 @@ describe('ol/geom/Polygon', function() {
|
|||||||
[[[3, 0], [0, 3], [0, 6], [6, 6], [3, 3]]]);
|
[[[3, 0], [0, 3], [0, 6], [6, 6], [3, 3]]]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('caches multiple simplified geometries', function() {
|
|
||||||
const simplifiedGeometry1 = polygon.getSimplifiedGeometry(4);
|
|
||||||
const simplifiedGeometry2 = polygon.getSimplifiedGeometry(9);
|
|
||||||
const simplifiedGeometry3 = polygon.getSimplifiedGeometry(4);
|
|
||||||
const simplifiedGeometry4 = polygon.getSimplifiedGeometry(9);
|
|
||||||
expect(simplifiedGeometry1).to.be(simplifiedGeometry3);
|
|
||||||
expect(simplifiedGeometry2).to.be(simplifiedGeometry4);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user