From 9bc1f208ebeaa4ee239fcfd3610e4b9785870b8b Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Mon, 30 May 2016 07:51:41 +0200 Subject: [PATCH] LUCENE-7289: Fix test bug, 65520 gets rounded to +Infinity too. --- .../src/test/org/apache/lucene/document/TestHalfFloatPoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestHalfFloatPoint.java b/lucene/sandbox/src/test/org/apache/lucene/document/TestHalfFloatPoint.java index d280944fba6..a24d99279b3 100644 --- a/lucene/sandbox/src/test/org/apache/lucene/document/TestHalfFloatPoint.java +++ b/lucene/sandbox/src/test/org/apache/lucene/document/TestHalfFloatPoint.java @@ -105,7 +105,7 @@ public class TestHalfFloatPoint extends LuceneTestCase { assertEquals(Float.floatToIntBits(f), Float.floatToIntBits(rounded), 0f); } else if (Float.isFinite(rounded) == false) { assertFalse(Float.isNaN(rounded)); - assertTrue(Math.abs(f) > 65520); + assertTrue(Math.abs(f) >= 65520); } else { int index = Arrays.binarySearch(values, f); float closest;