New test.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1449744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2013-02-25 15:19:41 +00:00
parent d788563f4e
commit f4e9bfe99f
1 changed files with 10 additions and 0 deletions

View File

@ -1634,4 +1634,14 @@ public class DfpTest extends AbstractExtendedFieldElementTest<Dfp> {
}
@Test
public void testSpecialConstructors() {
Assert.assertEquals(ninf, field.newDfp(Double.NEGATIVE_INFINITY));
Assert.assertEquals(ninf, field.newDfp("-Infinity"));
Assert.assertEquals(pinf, field.newDfp(Double.POSITIVE_INFINITY));
Assert.assertEquals(pinf, field.newDfp("Infinity"));
Assert.assertTrue(field.newDfp(Double.NaN).isNaN());
Assert.assertTrue(field.newDfp("NaN").isNaN());
}
}