Skip to content

Commit

Permalink
Remove leftover test class (#2046)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio authored Jul 29, 2024
2 parents 826075f + 193e32f commit a05c512
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions test-suite/utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <boost/test/tools/floating_point_comparison.hpp>
#endif
#include <cmath>
#include <functional>
#include <iomanip>
#include <numeric>
#include <string>
Expand Down Expand Up @@ -67,38 +66,8 @@ using QuantLib::value;
// This makes it easier to use array literals (for new code, use std::vector though)
#define LENGTH(a) (sizeof(a)/sizeof(a[0]))

#define QUANTLIB_TEST_CASE(f) BOOST_TEST_CASE(QuantLib::detail::quantlib_test_case(f))

namespace QuantLib {

namespace detail {

// used to avoid no-assertion messages in Boost 1.35
class quantlib_test_case {
std::function<void()> test_;
public:
template <class F>
explicit quantlib_test_case(F test) : test_(test) {}
void operator()() const {
// Restore settings after each test.
SavedSettings restore;
// Clear all fixings before running a test to avoid interference.
IndexManager::instance().clearHistories();
BOOST_CHECK(true);
test_();
}
#if BOOST_VERSION <= 105300
// defined to avoid unused-variable warnings. It doesn't
// work after Boost 1.53 because the functions were
// overloaded and the address can't be resolved.
void _use_check(
const void* = &boost::test_tools::check_is_close,
const void* = &boost::test_tools::check_is_small) const {}
#endif
};

}

std::string payoffTypeToString(const ext::shared_ptr<Payoff>&);
std::string exerciseTypeToString(const ext::shared_ptr<Exercise>&);

Expand Down

0 comments on commit a05c512

Please sign in to comment.