Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46CF3C25D for ; Fri, 6 Jul 2012 19:31:22 +0000 (UTC) Received: (qmail 38517 invoked by uid 500); 6 Jul 2012 19:31:22 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 38465 invoked by uid 500); 6 Jul 2012 19:31:22 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 38458 invoked by uid 99); 6 Jul 2012 19:31:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2012 19:31:22 +0000 X-ASF-Spam-Status: No, hits=-1999.0 required=5.0 tests=ALL_TRUSTED,FRT_ADOBE2 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2012 19:31:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 583D523888E4 for ; Fri, 6 Jul 2012 19:31:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1358366 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java Date: Fri, 06 Jul 2012 19:31:01 -0000 To: commits@commons.apache.org From: celestin@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120706193101.583D523888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: celestin Date: Fri Jul 6 19:31:00 2012 New Revision: 1358366 URL: http://svn.apache.org/viewvc?rev=1358366&view=rev Log: MATH-795: final clean-up of ArrayRealVectorTest. Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java?rev=1358366&r1=1358365&r2=1358366&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/ArrayRealVectorTest.java Fri Jul 6 19:31:00 2012 @@ -16,9 +16,6 @@ */ package org.apache.commons.math3.linear; -import java.io.Serializable; - -import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.exception.MathIllegalArgumentException; import org.junit.Assert; import org.junit.Test; @@ -150,27 +147,16 @@ public class ArrayRealVectorTest extends } @Test - public void testDataInOut() { - final double[] vec1 = {1d, 2d, 3d}; - final double[] vec3 = {7d, 8d, 9d}; - - ArrayRealVector v1 = new ArrayRealVector(vec1); - - RealVector v_copy = v1.copy(); - Assert.assertEquals("testData len", 3, v_copy.getDimension()); - Assert.assertNotSame("testData not same object ", v1.getDataRef(), v_copy.toArray()); - - double[] a_double = v1.toArray(); - Assert.assertEquals("testData len", 3, a_double.length); - Assert.assertNotSame("testData not same object ", v1.getDataRef(), a_double); + public void testGetDataRef() { + final double[] data = {1d, 2d, 3d, 4d}; + final ArrayRealVector v = new ArrayRealVector(data); + v.getDataRef()[0] = 0d; + Assert.assertEquals("", 0d, v.getEntry(0), 0); } @Test public void testPredicates() { - final ArrayRealVector v = (ArrayRealVector) create(new double[] { 0, 1, 2 }); - Assert.assertFalse(v.equals(v.getDataRef())); - Assert.assertEquals(create(new double[] { Double.NaN, 1, 2 }).hashCode(), create(new double[] { 0, Double.NaN, 2 }).hashCode());