Repository: commons-math Updated Branches: refs/heads/develop 819318486 -> 827d9644c
Disable the Math.round() test failing with Java 7 (fixed in Java 8) Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/827d9644 Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/827d9644 Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/827d9644 Branch: refs/heads/develop Commit: 827d9644c864336fa84f15744375ba7412da047c Parents: 8193184 Author: Emmanuel Bourg <[email protected]> Authored: Fri Aug 5 23:02:50 2016 +0200 Committer: Emmanuel Bourg <[email protected]> Committed: Fri Aug 5 23:02:50 2016 +0200 ---------------------------------------------------------------------- src/test/java/org/apache/commons/math4/util/FastMathTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/827d9644/src/test/java/org/apache/commons/math4/util/FastMathTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math4/util/FastMathTest.java b/src/test/java/org/apache/commons/math4/util/FastMathTest.java index 1f94352..d9d7c61 100644 --- a/src/test/java/org/apache/commons/math4/util/FastMathTest.java +++ b/src/test/java/org/apache/commons/math4/util/FastMathTest.java @@ -1948,7 +1948,7 @@ public class FastMathTest { */ @Test public void testRoundDown() { - double x = 0x1.fffffffffffffp-2; + double x = 0x1.fffffffffffffp-2; // greatest floating point value less than 0.5 assertTrue(x < 0.5d); assertEquals(0, FastMath.round(x)); @@ -1956,7 +1956,7 @@ public class FastMathTest { assertEquals("4503599627370497", new BigDecimal(x).toString()); assertTrue(x == Math.rint(x)); assertTrue(x == FastMath.round(x)); - assertTrue(x == Math.round(x)); + //assertTrue(x == Math.round(x)); // fails with Java 7, fixed in Java 8 } }
