commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r980154 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
Date Wed, 28 Jul 2010 18:47:29 GMT
Author: luc
Date: Wed Jul 28 18:47:28 2010
New Revision: 980154

URL: http://svn.apache.org/viewvc?rev=980154&view=rev
Log:
removed reference to Java 1.6 Math.nextUp method
JIRA: MATH-398

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java?rev=980154&r1=980153&r2=980154&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
Wed Jul 28 18:47:28 2010
@@ -365,8 +365,8 @@ public final class MathUtilsTest extends
         assertTrue(MathUtils.equals(1.0, 1 + Math.ulp(1d), 1));
         assertFalse(MathUtils.equals(1.0, 1 + 2 * Math.ulp(1d), 1));
 
-        final double nUp1 = Math.nextUp(1d);
-        final double nnUp1 = Math.nextUp(nUp1);
+        final double nUp1 = MathUtils.nextAfter(1d, Double.POSITIVE_INFINITY);
+        final double nnUp1 = MathUtils.nextAfter(nUp1, Double.POSITIVE_INFINITY);
         assertTrue(MathUtils.equals(1.0, nUp1, 1));
         assertTrue(MathUtils.equals(nUp1, nnUp1, 1));
         assertFalse(MathUtils.equals(1.0, nnUp1, 1));
@@ -403,8 +403,8 @@ public final class MathUtilsTest extends
         assertTrue(MathUtils.equalsIncludingNaN(1.0, 1 + Math.ulp(1d), 1));
         assertFalse(MathUtils.equalsIncludingNaN(1.0, 1 + 2 * Math.ulp(1d), 1));
 
-        final double nUp1 = Math.nextUp(1d);
-        final double nnUp1 = Math.nextUp(nUp1);
+        final double nUp1 = MathUtils.nextAfter(1d, Double.POSITIVE_INFINITY);
+        final double nnUp1 = Math.nextAfter(nUp1, Double.POSITIVE_INFINITY);
         assertTrue(MathUtils.equalsIncludingNaN(1.0, nUp1, 1));
         assertTrue(MathUtils.equalsIncludingNaN(nUp1, nnUp1, 1));
         assertFalse(MathUtils.equalsIncludingNaN(1.0, nnUp1, 1));



Mime
View raw message