Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 88636 invoked from network); 1 Oct 2010 14:55:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Oct 2010 14:55:02 -0000 Received: (qmail 108 invoked by uid 500); 1 Oct 2010 14:55:02 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 99633 invoked by uid 500); 1 Oct 2010 14:54:59 -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 99626 invoked by uid 99); 1 Oct 2010 14:54:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 14:54:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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, 01 Oct 2010 14:54:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 343A223889E0; Fri, 1 Oct 2010 14:54:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003549 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtilsTest.java Date: Fri, 01 Oct 2010 14:54:38 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101001145438.343A223889E0@eris.apache.org> Author: sebb Date: Fri Oct 1 14:54:37 2010 New Revision: 1003549 URL: http://svn.apache.org/viewvc?rev=1003549&view=rev Log: Split multiple tests Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtilsTest.java Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtilsTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtilsTest.java?rev=1003549&r1=1003548&r2=1003549&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtilsTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtilsTest.java Fri Oct 1 14:54:37 2010 @@ -40,13 +40,16 @@ public class UnivariateRealSolverUtilsTe } } - public void testSolveBadParameters() throws MathException { + public void testSolveBadEndpoints() throws MathException { try { // bad endpoints UnivariateRealSolverUtils.solve(sin,0.0, 4.0, 4.0); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected } + } + + public void testSolveBadAccuracy() throws MathException { try { // bad accuracy UnivariateRealSolverUtils.solve(sin, 0.0, 4.0, 0.0); fail("Expecting IllegalArgumentException"); @@ -99,25 +102,34 @@ public class UnivariateRealSolverUtilsTe assertTrue(sin.value(result[1]) > 0); } - public void testBadParameters() throws MathException { + public void testNullFunction() throws MathException { try { // null function UnivariateRealSolverUtils.bracket(null, 1.5, 0, 2.0); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected } + } + + public void testBadInitial() throws MathException { try { // initial not between endpoints UnivariateRealSolverUtils.bracket(sin, 2.5, 0, 2.0); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected } + } + + public void testBadEndpoints() throws MathException { try { // endpoints not valid UnivariateRealSolverUtils.bracket(sin, 1.5, 2.0, 1.0); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { // expected } + } + + public void testBadMaximumIterations() throws MathException { try { // bad maximum iterations UnivariateRealSolverUtils.bracket(sin, 1.5, 0, 2.0, 0); fail("Expecting IllegalArgumentException");