LUCENE-7289: Fix test bug, 65520 gets rounded to +Infinity too.

This commit is contained in:
Adrien Grand 2016-05-30 07:51:41 +02:00
parent e37e49ed46
commit 9bc1f208eb
1 changed files with 1 additions and 1 deletions

View File

@ -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;