commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1449744 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/dfp/DfpTest.java
Date Mon, 25 Feb 2013 15:19:42 GMT
Author: luc
Date: Mon Feb 25 15:19:41 2013
New Revision: 1449744

URL: http://svn.apache.org/r1449744
Log:
New test.

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/dfp/DfpTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/dfp/DfpTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/dfp/DfpTest.java?rev=1449744&r1=1449743&r2=1449744&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/dfp/DfpTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/dfp/DfpTest.java Mon
Feb 25 15:19:41 2013
@@ -1634,4 +1634,14 @@ public class DfpTest extends AbstractExt
 
     }
 
+    @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());
+    }
+
 }



Mime
View raw message