Apache Lucene open-source search software
this test uses NaN to mean missing. don't try to quantize it.
Robert Muir7476d0622f24
diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/util/BaseGeoPointTestCase.java b/lucene/spatial/src/test/org/apache/lucene/spatial/util/BaseGeoPointTestCase.javaindex 021d638e759..0d6b5bdd630 100644--- a/lucene/spatial/src/test/org/apache/lucene/spatial/util/BaseGeoPointTestCase.java+++ b/lucene/spatial/src/test/org/apache/lucene/spatial/util/BaseGeoPointTestCase.java@@ -726,11 +726,16 @@ public abstract class BaseGeoPointTestCase extends LuceneTestCase {private void verify(boolean small, double[] lats, double[] lons) throws Exception {// quantize each value the same way the index does+ // NaN means missing for the doc!!!!!for (int i = 0; i < lats.length; i++) {- lats[i] = quantizeLat(lats[i]);+ if (!Double.isNaN(lats[i])) {+ lats[i] = quantizeLat(lats[i]);+ }}for (int i = 0; i < lons.length; i++) {- lons[i] = quantizeLon(lons[i]);+ if (!Double.isNaN(lons[i])) {+ lons[i] = quantizeLon(lons[i]);+ }}verifyRandomRectangles(small, lats, lons);verifyRandomDistances(small, lats, lons);