From a5f5a9384163811b6309d42cfe1272ca0c7b34d6 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Wed, 2 Feb 2011 01:23:51 +0000 Subject: [PATCH] Fix broken tests: add missing fail() calls git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1066297 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/commons/math/analysis/solvers/BrentSolverTest.java | 1 + .../apache/commons/math/linear/FieldLUDecompositionImplTest.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java b/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java index c48ebfb2e..60e3b62a6 100644 --- a/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java +++ b/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java @@ -149,6 +149,7 @@ public final class BrentSolverTest { try { result = solver.solve(5, f, 0.85, 5); + Assert.fail("Expected TooManyEvaluationsException"); } catch (TooManyEvaluationsException e) { // Expected. } diff --git a/src/test/java/org/apache/commons/math/linear/FieldLUDecompositionImplTest.java b/src/test/java/org/apache/commons/math/linear/FieldLUDecompositionImplTest.java index fe29d889b..c1a2a2536 100644 --- a/src/test/java/org/apache/commons/math/linear/FieldLUDecompositionImplTest.java +++ b/src/test/java/org/apache/commons/math/linear/FieldLUDecompositionImplTest.java @@ -78,6 +78,7 @@ public class FieldLUDecompositionImplTest extends TestCase { { Fraction.ZERO, Fraction.ZERO }, { Fraction.ZERO, Fraction.ZERO } })); + fail("Expected NonSquareMatrixException"); } catch (NonSquareMatrixException ime) { // expected behavior }