Fix test to recognize null polygon response.

This commit is contained in:
Karl Wright 2016-04-19 12:06:15 -04:00
parent 2342290816
commit 5bb9084bd5
2 changed files with 6 additions and 0 deletions

View File

@ -145,6 +145,9 @@ public class Geo3dRptTest extends RandomSpatialOpStrategyTestCase {
final int convexPointIndex = random().nextInt(vertexCount); //If we get this wrong, hopefully we get IllegalArgumentException
try {
final GeoShape shape = GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE, geoPoints);
if (shape == null) {
continue;
}
return new Geo3dShape(shape, ctx);
} catch (IllegalArgumentException e) {
// This is what happens when we create a shape that is invalid. Although it is conceivable that there are cases where

View File

@ -186,6 +186,9 @@ public abstract class Geo3dShapeRectRelationTestCase extends RandomizedShapeTest
}
try {
final GeoShape shape = GeoPolygonFactory.makeGeoPolygon(planetModel, geoPoints);
if (shape == null) {
continue;
}
return new Geo3dShape(planetModel, shape, ctx);
} catch (IllegalArgumentException e) {
// This is what happens when we create a shape that is invalid. Although it is conceivable that there are cases where