commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1348225 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear: RealVectorAbstractTest.java RealVectorTest.java
Date Fri, 08 Jun 2012 20:10:50 GMT
Author: celestin
Date: Fri Jun  8 20:10:49 2012
New Revision: 1348225

URL: http://svn.apache.org/viewvc?rev=1348225&view=rev
Log:
MATH-795: in RealVectorAbstractTest, extracted testIsNaN() from
testPredicates().

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorAbstractTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorAbstractTest.java?rev=1348225&r1=1348224&r2=1348225&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorAbstractTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorAbstractTest.java
Fri Jun  8 20:10:49 2012
@@ -382,6 +382,15 @@ public abstract class RealVectorAbstract
     }
 
     @Test
+    public void testIsNaN() {
+        final RealVector v = create(new double[] {0, 1, 2});
+
+        Assert.assertFalse(v.isNaN());
+        v.setEntry(1, Double.NaN);
+        Assert.assertTrue(v.isNaN());
+    }
+
+    @Test
     public void testDataInOut() {
         final RealVector v1 = create(vec1);
         final RealVector v2 = create(vec2);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorTest.java?rev=1348225&r1=1348224&r2=1348225&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorTest.java
Fri Jun  8 20:10:49 2012
@@ -283,6 +283,13 @@ public class RealVectorTest extends Real
     }
 
     @Test
+    @Ignore("Abstract class RealVector does not implement isNaN()")
+    @Override
+    public void testIsNaN() {
+        // Do nothing
+    }
+
+    @Test
     @Ignore
     @Override
     public void testBasicFunctions() {



Mime
View raw message