Changed NaN comparison tests to use TestUtils.assertSame.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@737011 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2009-01-23 11:30:27 +00:00
parent c5d148896f
commit 7d54daea2a
1 changed files with 2 additions and 2 deletions

View File

@ -928,7 +928,7 @@ public final class MathUtilsTest extends TestCase {
assertEquals(1.0, MathUtils.sign(2.0), delta);
assertEquals(0.0, MathUtils.sign(0.0), delta);
assertEquals(-1.0, MathUtils.sign(-2.0), delta);
assertEquals(-0. / 0., MathUtils.sign(Double.NaN), delta);
TestUtils.assertSame(-0. / 0., MathUtils.sign(Double.NaN));
}
public void testSignFloat() {
@ -936,7 +936,7 @@ public final class MathUtilsTest extends TestCase {
assertEquals(1.0F, MathUtils.sign(2.0F), delta);
assertEquals(0.0F, MathUtils.sign(0.0F), delta);
assertEquals(-1.0F, MathUtils.sign(-2.0F), delta);
assertEquals(Float.NaN, MathUtils.sign(Float.NaN), delta);
TestUtils.assertSame(Float.NaN, MathUtils.sign(Float.NaN));
}
public void testSignInt() {