commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: [MATH] don't know how to fix UnivariateRealSolverUtilsTest.java test failures
Date Fri, 01 Oct 2010 15:17:26 GMT
On Fri, Oct 01, 2010 at 04:01:21PM +0100, sebb AT ASF wrote:
> The following tests were updated recently to add fail() calls, but the
> IAE is not generated.
> 
> Anyone have an idea how to fix the tests so the IAE is thrown?
> 
>     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");
>         } catch (IllegalArgumentException ex) {
>             // expected
>         }
>     }
>

Aah, don't we wish we had logging in CM?  ;-)


Best,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message