improved test coverage

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@588655 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2007-10-26 14:13:13 +00:00
parent 3f5bd34a92
commit 08939e1068
9 changed files with 9 additions and 1 deletions

View File

@ -116,7 +116,7 @@ public class ClassicalRungeKuttaIntegratorTest
assertTrue(handler.getLastError() < 2.0e-13); assertTrue(handler.getLastError() < 2.0e-13);
assertTrue(handler.getMaximalError() < 4.0e-12); assertTrue(handler.getMaximalError() < 4.0e-12);
assertEquals("classical Runge-Kutta", integ.getName());
} }
public void testBigStep() public void testBigStep()

View File

@ -97,6 +97,7 @@ public class DormandPrince54IntegratorTest
pb.getInitialTime(), pb.getInitialState(), pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]); pb.getFinalTime(), new double[pb.getDimension()]);
assertTrue(handler.wasLastSeen()); assertTrue(handler.wasLastSeen());
assertEquals("Dormand-Prince 5(4)", integ.getName());
} }

View File

@ -189,6 +189,7 @@ public class DormandPrince853IntegratorTest
integ.integrate(pb, integ.integrate(pb,
pb.getInitialTime(), pb.getInitialState(), pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]); pb.getFinalTime(), new double[pb.getDimension()]);
assertEquals("Dormand-Prince 8 (5, 3)", integ.getName());
} }
public void testNoDenseOutput() public void testNoDenseOutput()

View File

@ -97,6 +97,7 @@ public class EulerIntegratorTest
assertTrue(handler.getLastError() < 2.0e-4); assertTrue(handler.getLastError() < 2.0e-4);
assertTrue(handler.getMaximalError() < 1.0e-3); assertTrue(handler.getMaximalError() < 1.0e-3);
assertEquals("Euler", integ.getName());
} }

View File

@ -96,6 +96,7 @@ public class GillIntegratorTest
assertTrue(handler.getLastError() < 2.0e-13); assertTrue(handler.getLastError() < 2.0e-13);
assertTrue(handler.getMaximalError() < 4.0e-12); assertTrue(handler.getMaximalError() < 4.0e-12);
assertEquals("Gill", integ.getName());
} }

View File

@ -189,6 +189,7 @@ public class GraggBulirschStoerIntegratorTest
integ.integrate(pb, integ.integrate(pb,
pb.getInitialTime(), pb.getInitialState(), pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]); pb.getFinalTime(), new double[pb.getDimension()]);
assertEquals("Gragg-Bulirsch-Stoer", integ.getName());
} }
public void testUnstableDerivative() public void testUnstableDerivative()

View File

@ -236,6 +236,7 @@ public class HighamHall54IntegratorTest
integ.integrate(pb, integ.integrate(pb,
pb.getInitialTime(), pb.getInitialState(), pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]); pb.getFinalTime(), new double[pb.getDimension()]);
assertEquals("Higham-Hall 5(4)", integ.getName());
} }
private static class KeplerHandler implements StepHandler { private static class KeplerHandler implements StepHandler {

View File

@ -95,6 +95,7 @@ public class MidpointIntegratorTest
assertTrue(handler.getLastError() < 2.0e-7); assertTrue(handler.getLastError() < 2.0e-7);
assertTrue(handler.getMaximalError() < 1.0e-6); assertTrue(handler.getMaximalError() < 1.0e-6);
assertEquals("midpoint", integ.getName());
} }

View File

@ -96,6 +96,7 @@ public class ThreeEighthesIntegratorTest
assertTrue(handler.getLastError() < 2.0e-13); assertTrue(handler.getLastError() < 2.0e-13);
assertTrue(handler.getMaximalError() < 4.0e-12); assertTrue(handler.getMaximalError() < 4.0e-12);
assertEquals("3/8", integ.getName());
} }