2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

A few fixes to keep Borland happy.

[SVN r39843]
This commit is contained in:
John Maddock
2007-10-09 14:49:37 +00:00
parent 2983887486
commit 1c2234f016
4 changed files with 14 additions and 0 deletions

View File

@@ -8,8 +8,10 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/binomial.hpp>
#include <boost/math/tools/test.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
#endif
#include <boost/array.hpp>
#include "handle_test_result.hpp"
@@ -102,6 +104,7 @@ T binomial_wrapper(T n, T k)
template <class T>
void test_binomial(T, const char* type_name)
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
using namespace boost::lambda;
using namespace std;
@@ -133,6 +136,7 @@ void test_binomial(T, const char* type_name)
std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
handle_test_result(result, binomial_large_data[result.worst()], result.worst(), type_name, "binomial_coefficient", "Binomials: large arguments");
std::cout << std::endl;
#endif
}
template <class T>

View File

@@ -133,8 +133,10 @@ int test_main(int, char* [] )
// then run the tests:
test_classify(float(0), "float");
test_classify(double(0), "double");
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_classify((long double)(0), "long double");
test_classify((boost::math::concepts::real_concept)(0), "real_concept");
#endif
return 0;
}

View File

@@ -8,8 +8,10 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/digamma.hpp>
#include <boost/array.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
#endif
#include "handle_test_result.hpp"
@@ -67,6 +69,7 @@ void expected_results()
template <class T>
void do_test_digamma(const T& data, const char* type_name, const char* test_name)
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
typedef typename T::value_type row_type;
typedef typename row_type::value_type value_type;
@@ -88,6 +91,7 @@ void do_test_digamma(const T& data, const char* type_name, const char* test_name
boost::lambda::ret<value_type>(boost::lambda::_1[1]));
handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::digamma", test_name);
std::cout << std::endl;
#endif
}
template <class T>

View File

@@ -18,8 +18,10 @@
#include <boost/math/special_functions/hermite.hpp>
#include <boost/math/constants/constants.hpp>
#include <boost/array.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
#endif
#include "handle_test_result.hpp"
#include "test_legendre_hooks.hpp"
@@ -96,6 +98,7 @@ void expected_results()
template <class T>
void do_test_hermite(const T& data, const char* type_name, const char* test_name)
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
typedef typename T::value_type row_type;
typedef typename row_type::value_type value_type;
@@ -125,6 +128,7 @@ void do_test_hermite(const T& data, const char* type_name, const char* test_name
handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::hermite", test_name);
std::cout << std::endl;
#endif
}
template <class T>