From ee2bb8079fb08ce8e45ed910462d41e8dc51d93b Mon Sep 17 00:00:00 2001 From: Luigi Ballabio Date: Tue, 19 Dec 2023 09:20:49 +0100 Subject: [PATCH] Use autogenerated initializer function --- test-suite/paralleltestrunner.hpp | 4 ++-- test-suite/quantlibtestsuite.cpp | 12 ++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/test-suite/paralleltestrunner.hpp b/test-suite/paralleltestrunner.hpp index f343af95cee..df77bb94033 100755 --- a/test-suite/paralleltestrunner.hpp +++ b/test-suite/paralleltestrunner.hpp @@ -88,8 +88,8 @@ namespace { bool visit(test_unit const& tu) { if (tu.p_parent_id == framework::master_test_suite().p_id) { BOOST_TEST_MESSAGE(tu.p_name.get()); - QL_REQUIRE(!tu.p_name.get().compare("QuantLibTests") or !tu.p_name.get().compare("QuantLib test suite"), - "could not find QuantLib test suite"); + QL_REQUIRE(!tu.p_name.get().compare("QuantLibTests"), + "could not find QuantLib test suite"); testSuiteId_ = tu.p_id; } diff --git a/test-suite/quantlibtestsuite.cpp b/test-suite/quantlibtestsuite.cpp index bb2cdd7c6c4..18ff8baaa80 100644 --- a/test-suite/quantlibtestsuite.cpp +++ b/test-suite/quantlibtestsuite.cpp @@ -18,6 +18,8 @@ FOR A PARTICULAR PURPOSE. See the license for more details. */ +#define BOOST_TEST_MODULE QuantLibTests + #ifdef QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER #include "paralleltestrunner.hpp" #else @@ -31,13 +33,3 @@ # include #endif -#include "quantlibglobalfixture.hpp" - -using namespace boost::unit_test_framework; - -test_suite* init_unit_test_suite(int, char* []) { - - auto* test = BOOST_TEST_SUITE("QuantLib test suite"); - - return test; -}