You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kw...@apache.org on 2018/05/29 16:43:14 UTC
lucene-solr:master: LUCENE-8337: Add disabled unit test for failure
Repository: lucene-solr
Updated Branches:
refs/heads/master 4ea9d2ea8 -> 7ce6dbda1
LUCENE-8337: Add disabled unit test for failure
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7ce6dbda
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7ce6dbda
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7ce6dbda
Branch: refs/heads/master
Commit: 7ce6dbda1815778d482e3ae2c00ec96fe1b10162
Parents: 4ea9d2e
Author: Karl Wright <Da...@gmail.com>
Authored: Tue May 29 12:42:56 2018 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Tue May 29 12:42:56 2018 -0400
----------------------------------------------------------------------
.../lucene/spatial3d/geom/GeoPolygonTest.java | 32 ++++++++++++++++++++
1 file changed, 32 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7ce6dbda/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
index 54c11ce..a2a4e85 100755
--- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
+++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
@@ -1816,4 +1816,36 @@ shape:
}
+ @Test
+ @AwaitsFix(bugUrl="https://issues.apache.org/jira/browse/LUCENE-8337")
+ public void testLUCENE8337() {
+ /*
+ {planetmodel=PlanetModel.WGS84, number of shapes=1, address=c865f21d,
+ testPoint=[lat=2.114284741800425E-5, lon=-3.141516973708951([X=-1.0011188509002849, Y=-7.57645554894811E-5, Z=2.1166503175641402E-5])], testPointInSet=true, shapes={
+{[lat=1.4379241972924144E-5, lon=-3.141520309370815([X=-1.0011188512685139, Y=-7.24251615257059E-5, Z=1.4395330244708275E-5])],
+[lat=-1.858900171939205E-5, lon=-3.1415059739464217([X=-1.001118850057461, Y=-8.677662511280753E-5, Z=-1.860980009708855E-5])],
+[lat=2.7071641284581073E-5, lon=-3.141469177092562([X=-1.001118845991408, Y=-1.2361464904363391E-4, Z=2.7101930495137982E-5])],
+[lat=8.285235549000288E-5, lon=-3.1414967545451287([X=-1.0011188459297669, Y=-9.600634121467467E-5, Z=8.29450550819143E-5])],
+[lat=-8.956596846349593E-303, lon=-3.1415926535897922([X=-1.0011188539924791, Y=-1.0117738616818362E-15, Z=-8.966617970490158E-303])]}}
+
+ [junit4] > Point: [lat=-6.499661194605612E-10, lon=-2.0286460544410216([X=-0.4425148814082194, Y=-0.8980086522698344, Z=-6.506933366482957E-10])]
+ */
+
+ final List<GeoPoint> points = new ArrayList<>();
+ points.add(new GeoPoint(PlanetModel.WGS84, 1.4379241972924144E-5, -3.141520309370815));
+ points.add(new GeoPoint(PlanetModel.WGS84, -1.858900171939205E-5, -3.1415059739464217));
+ points.add(new GeoPoint(PlanetModel.WGS84, 2.7071641284581073E-5, -3.141469177092562));
+ points.add(new GeoPoint(PlanetModel.WGS84, 8.285235549000288E-5, -3.1414967545451287));
+ points.add(new GeoPoint(PlanetModel.WGS84, -8.956596846349593E-303, -3.1415926535897922));
+ final GeoPolygonFactory.PolygonDescription description = new GeoPolygonFactory.PolygonDescription(points);
+
+ final GeoPolygon largePolygon = GeoPolygonFactory.makeLargeGeoPolygon(PlanetModel.WGS84, Collections.singletonList(description));
+ final GeoPolygon smallPolygon = GeoPolygonFactory.makeGeoPolygon(PlanetModel.WGS84, description);
+
+ final GeoPoint thePoint = new GeoPoint(PlanetModel.WGS84, -6.499661194605612E-10, -2.0286460544410216);
+
+ assertTrue(largePolygon.isWithin(thePoint) == smallPolygon.isWithin(thePoint));
+
+ }
+
}