Skip to content

Commit

Permalink
Move test into Fast section
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Mar 5, 2021
1 parent 68a0254 commit e162d26
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 39 deletions.
58 changes: 21 additions & 37 deletions test-suite/interpolations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2397,58 +2397,42 @@ void InterpolationTest::testBackwardFlatOnSinglePoint() {
}
}

test_suite* InterpolationTest::suite() {
test_suite* InterpolationTest::suite(SpeedLevel speed) {
auto* suite = BOOST_TEST_SUITE("Interpolation tests");

suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testSplineOnGenericValues));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testSimmetricEndConditions));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testDerivativeEndConditions));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testNonRestrictiveHymanFilter));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testSplineOnRPN15AValues));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testSplineOnGaussianValues));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testSplineErrorOnGaussianValues));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testSplineOnGenericValues));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testSimmetricEndConditions));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testDerivativeEndConditions));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testNonRestrictiveHymanFilter));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testSplineOnRPN15AValues));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testSplineOnGaussianValues));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testSplineErrorOnGaussianValues));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testMultiSpline));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testAsFunctor));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testFritschButland));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testBackwardFlat));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testForwardFlat));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testSabrInterpolation));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testFlochKennedySabrIsSmoothAroundATM));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testLeFlochKennedySabrExample));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testFlochKennedySabrIsSmoothAroundATM));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testLeFlochKennedySabrExample));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testKernelInterpolation));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testKernelInterpolation2D));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testKernelInterpolation2D));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testBicubicDerivatives));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testBicubicUpdate));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testUnknownRichardsonExtrapolation));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testRichardsonExtrapolation));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testNoArbSabrInterpolation));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testUnknownRichardsonExtrapolation));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testRichardsonExtrapolation));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testSabrSingleCases));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testTransformations));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testLagrangeInterpolation));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testLagrangeInterpolationAtSupportPoint));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testLagrangeInterpolationDerivative));
suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testLagrangeInterpolationOnChebyshevPoints));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testLagrangeInterpolation));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testLagrangeInterpolationAtSupportPoint));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testLagrangeInterpolationDerivative));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testLagrangeInterpolationOnChebyshevPoints));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testBSplines));
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testBackwardFlatOnSinglePoint));

suite->add(QUANTLIB_TEST_CASE(
&InterpolationTest::testBackwardFlatOnSinglePoint));

if (speed <= Fast) {
suite->add(QUANTLIB_TEST_CASE(&InterpolationTest::testNoArbSabrInterpolation));
}

return suite;
}
3 changes: 2 additions & 1 deletion test-suite/interpolations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define quantlib_test_interpolations_hpp

#include <boost/test/unit_test.hpp>
#include "speedlevel.hpp"

/* remember to document new and/or updated tests in the Doxygen
comment block of the corresponding class */
Expand Down Expand Up @@ -63,7 +64,7 @@ class InterpolationTest {
static void testBSplines();
static void testBackwardFlatOnSinglePoint();

static boost::unit_test_framework::test_suite* suite();
static boost::unit_test_framework::test_suite* suite(SpeedLevel);
};


Expand Down
2 changes: 1 addition & 1 deletion test-suite/quantlibtestsuite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ test_suite* init_unit_test_suite(int, char* []) {
test->add(InstrumentTest::suite());
test->add(IntegralTest::suite());
test->add(InterestRateTest::suite());
test->add(InterpolationTest::suite());
test->add(InterpolationTest::suite(speed));
test->add(JumpDiffusionTest::suite());
test->add(LazyObjectTest::suite());
test->add(LinearLeastSquaresRegressionTest::suite());
Expand Down

0 comments on commit e162d26

Please sign in to comment.