commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1060488 - /commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
Date Tue, 18 Jan 2011 17:35:54 GMT
Author: sebb
Date: Tue Jan 18 17:35:54 2011
New Revision: 1060488

URL: http://svn.apache.org/viewvc?rev=1060488&view=rev
Log:
Incorrect test for deprecated method

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

Modified: commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/util/MathUtilsTest.java?rev=1060488&r1=1060487&r2=1060488&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
Tue Jan 18 17:35:54 2011
@@ -365,7 +365,8 @@ public final class MathUtilsTest extends
         assertTrue("+0.0f == -0.0f",MathUtils.equals(0.0f, -0.0f));
         assertTrue("+0.0f == -0.0f (1 ulp)",MathUtils.equals(0.0f, -0.0f, 1));
         float oneFloat = 1.0f;
-        assertTrue("1.0f == 1.0f + 1 ulp",MathUtils.equals(oneFloat, Float.intBitsToFloat(1
+ Float.floatToIntBits(oneFloat))));
+        // Deprecated method - requires parameters to be strictly equal
+        assertFalse("1.0f != 1.0f + 1 ulp",MathUtils.equals(oneFloat, Float.intBitsToFloat(1
+ Float.floatToIntBits(oneFloat))));
         assertTrue("1.0f == 1.0f + 1 ulp (1 ulp)",MathUtils.equals(oneFloat, Float.intBitsToFloat(1
+ Float.floatToIntBits(oneFloat)), 1));
         assertFalse("1.0f != 1.0f + 2 ulp (1 ulp)",MathUtils.equals(oneFloat, Float.intBitsToFloat(2
+ Float.floatToIntBits(oneFloat)), 1));
 



Mime
View raw message