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: svn commit: r1066299 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java
Date Wed, 02 Feb 2011 09:32:32 GMT
Hi.

> Author: sebb
> Date: Wed Feb  2 01:37:49 2011
> New Revision: 1066299
> 
> URL: http://svn.apache.org/viewvc?rev=1066299&view=rev
> Log:
> No point catching and then calling fail - just let JUnit do the work
> 
> Modified:
>     commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java
> 
> Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java?rev=1066299&r1=1066298&r2=1066299&view=diff
> ==============================================================================
> --- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java
(original)
> +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/RealVectorFormatAbstractTest.java
Wed Feb  2 01:37:49 2011
> @@ -167,12 +167,8 @@ public abstract class RealVectorFormatAb
>      public void testParseSimpleNoDecimals() {
>          String source = "{1; 1; 1}";
>          ArrayRealVector expected = new ArrayRealVector(new double[] {1, 1, 1});
> -        try {
> -            ArrayRealVector actual = realVectorFormat.parse(source);
> -            Assert.assertEquals(expected, actual);
> -        } catch (MathParseException ex) {
> -            Assert.fail(ex.getMessage());
> -        }
> +        ArrayRealVector actual = realVectorFormat.parse(source);
> +        Assert.assertEquals(expected, actual);
>      }

Perhaps there was a reason for such a construct; I don't know who came up
with it, but it might be interesting to ask.
 

Gilles

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


Mime
View raw message