You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ce...@apache.org on 2012/07/06 07:26:35 UTC

svn commit: r1358046 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorAbstractTest.java

Author: celestin
Date: Fri Jul  6 05:26:35 2012
New Revision: 1358046

URL: http://svn.apache.org/viewvc?rev=1358046&view=rev
Log:
MATH-795: removed redundant unit tests.

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/RealVectorAbstractTest.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=1358046&r1=1358045&r2=1358046&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 Jul  6 05:26:35 2012
@@ -1363,62 +1363,9 @@ public abstract class RealVectorAbstract
     }
 
     @Test
-    public void testBasicFunctions() {
-        final RealVector v1 = create(vec1);
-        final RealVector v2 = create(vec2);
-        final RealVector v5 = create(vec5);
-        final RealVector v_null = create(vec_null);
-
-        final RealVector v2_t = createAlien(vec2);
-
-        RealVector v_projection = v1.projection(v2);
-        double[] result_projection = {1.662337662337662, 2.0779220779220777, 2.493506493506493};
-        assertClose("compare vect", v_projection.toArray(), result_projection, normTolerance);
-
-        RealVector v_projection_2 = v1.projection(v2_t);
-        double[] result_projection_2 = {1.662337662337662, 2.0779220779220777, 2.493506493506493};
-        assertClose("compare vect", v_projection_2.toArray(), result_projection_2, normTolerance);
-    }
-
-    @Test
-    public void testMisc() {
-        RealVector v1 = create(vec1);
-        RealVector v4 = create(vec4);
-        RealVector v4_2 = create(vec4);
-
-        String out1 = v1.toString();
-        Assert.assertTrue("some output ",  out1.length()!=0);
-        try {
-            v1.checkVectorDimensions(2);
-            Assert.fail("MathIllegalArgumentException expected");
-        } catch (MathIllegalArgumentException ex) {
-            // expected behavior
-        }
-
-       try {
-            v1.checkVectorDimensions(v4);
-            Assert.fail("MathIllegalArgumentException expected");
-        } catch (MathIllegalArgumentException ex) {
-            // expected behavior
-        }
-
-        try {
-            v1.checkVectorDimensions(v4_2);
-            Assert.fail("MathIllegalArgumentException expected");
-        } catch (MathIllegalArgumentException ex) {
-            // expected behavior
-        }
-    }
-
-    @Test
-    public void testPredicates() {
+    public void testEquals() {
         final RealVector v = create(new double[] { 0, 1, 2 });
 
-        v.setEntry(0, 0);
-        Assert.assertEquals(v, create(new double[] { 0, 1, 2 }));
-        Assert.assertNotSame(v, create(new double[] { 0, 1, 2 + FastMath.ulp(2)}));
-        Assert.assertNotSame(v, create(new double[] { 0, 1, 2, 3 }));
-
         Assert.assertTrue(v.equals(v));
         Assert.assertTrue(v.equals(v.copy()));
         Assert.assertFalse(v.equals(null));