diff --git a/src/test/java/org/apache/commons/math/linear/SparseFieldVectorTest.java b/src/test/java/org/apache/commons/math/linear/SparseFieldVectorTest.java index 23136dc61..b1976a063 100644 --- a/src/test/java/org/apache/commons/math/linear/SparseFieldVectorTest.java +++ b/src/test/java/org/apache/commons/math/linear/SparseFieldVectorTest.java @@ -55,57 +55,57 @@ public class SparseFieldVectorTest { //octave = v1 .+ 2.0 FieldVector v_mapAdd = v1.mapAdd(new Fraction(2)); Fraction[] result_mapAdd = {new Fraction(3), new Fraction(4), new Fraction(5)}; - Assert.assertEquals("compare vectors" ,result_mapAdd,v_mapAdd.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapAdd,v_mapAdd.getData()); //octave = v1 .+ 2.0 FieldVector v_mapAddToSelf = v1.copy(); v_mapAddToSelf.mapAddToSelf(new Fraction(2)); Fraction[] result_mapAddToSelf = {new Fraction(3), new Fraction(4), new Fraction(5)}; - Assert.assertEquals("compare vectors" ,result_mapAddToSelf,v_mapAddToSelf.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapAddToSelf,v_mapAddToSelf.getData()); //octave = v1 .- 2.0 FieldVector v_mapSubtract = v1.mapSubtract(new Fraction(2)); Fraction[] result_mapSubtract = {new Fraction(-1), new Fraction(0), new Fraction(1)}; - Assert.assertEquals("compare vectors" ,result_mapSubtract,v_mapSubtract.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapSubtract,v_mapSubtract.getData()); //octave = v1 .- 2.0 FieldVector v_mapSubtractToSelf = v1.copy(); v_mapSubtractToSelf.mapSubtractToSelf(new Fraction(2)); Fraction[] result_mapSubtractToSelf = {new Fraction(-1), new Fraction(0), new Fraction(1)}; - Assert.assertEquals("compare vectors" ,result_mapSubtractToSelf,v_mapSubtractToSelf.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapSubtractToSelf,v_mapSubtractToSelf.getData()); //octave = v1 .* 2.0 FieldVector v_mapMultiply = v1.mapMultiply(new Fraction(2)); Fraction[] result_mapMultiply = {new Fraction(2), new Fraction(4), new Fraction(6)}; - Assert.assertEquals("compare vectors" ,result_mapMultiply,v_mapMultiply.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapMultiply,v_mapMultiply.getData()); //octave = v1 .* 2.0 FieldVector v_mapMultiplyToSelf = v1.copy(); v_mapMultiplyToSelf.mapMultiplyToSelf(new Fraction(2)); Fraction[] result_mapMultiplyToSelf = {new Fraction(2), new Fraction(4), new Fraction(6)}; - Assert.assertEquals("compare vectors" ,result_mapMultiplyToSelf,v_mapMultiplyToSelf.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapMultiplyToSelf,v_mapMultiplyToSelf.getData()); //octave = v1 ./ 2.0 FieldVector v_mapDivide = v1.mapDivide(new Fraction(2)); Fraction[] result_mapDivide = {new Fraction(.5d), new Fraction(1), new Fraction(1.5d)}; - Assert.assertEquals("compare vectors" ,result_mapDivide,v_mapDivide.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapDivide,v_mapDivide.getData()); //octave = v1 ./ 2.0 FieldVector v_mapDivideToSelf = v1.copy(); v_mapDivideToSelf.mapDivideToSelf(new Fraction(2)); Fraction[] result_mapDivideToSelf = {new Fraction(.5d), new Fraction(1), new Fraction(1.5d)}; - Assert.assertEquals("compare vectors" ,result_mapDivideToSelf,v_mapDivideToSelf.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapDivideToSelf,v_mapDivideToSelf.getData()); //octave = v1 .^-1 FieldVector v_mapInv = v1.mapInv(); Fraction[] result_mapInv = {new Fraction(1),new Fraction(0.5d),new Fraction(3.333333333333333e-01d)}; - Assert.assertEquals("compare vectors" ,result_mapInv,v_mapInv.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapInv,v_mapInv.getData()); //octave = v1 .^-1 FieldVector v_mapInvToSelf = v1.copy(); v_mapInvToSelf.mapInvToSelf(); Fraction[] result_mapInvToSelf = {new Fraction(1),new Fraction(0.5d),new Fraction(3.333333333333333e-01d)}; - Assert.assertEquals("compare vectors" ,result_mapInvToSelf,v_mapInvToSelf.getData()); + Assert.assertArrayEquals("compare vectors" ,result_mapInvToSelf,v_mapInvToSelf.getData()); } @@ -120,12 +120,12 @@ public class SparseFieldVectorTest { //octave = v1 + v2 FieldVector v_add = v1.add(v2); Fraction[] result_add = {new Fraction(5), new Fraction(7), new Fraction(9)}; - Assert.assertEquals("compare vect" ,v_add.getData(),result_add); + Assert.assertArrayEquals("compare vect" ,v_add.getData(),result_add); SparseFieldVector vt2 = new SparseFieldVector(field,vec2); FieldVector v_add_i = v1.add(vt2); Fraction[] result_add_i = {new Fraction(5), new Fraction(7), new Fraction(9)}; - Assert.assertEquals("compare vect" ,v_add_i.getData(),result_add_i); + Assert.assertArrayEquals("compare vect" ,v_add_i.getData(),result_add_i); //octave = v1 - v2 SparseFieldVector v_subtract = v1.subtract(v2);