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-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to