From 7858278bec1fa4661e09faf1f8ccdcd64a938756 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 23 Jul 2013 11:09:47 +0000 Subject: [PATCH] Fix gcc-4.8.x warnings. Fix some Mingw failures. Fixes #8855. [SVN r85131] --- build/Jamfile.v2 | 1 + .../math/distributions/inverse_gaussian.hpp | 2 +- include/boost/math/special_functions/airy.hpp | 4 ++-- include/boost/math/special_functions/beta.hpp | 2 -- test/Jamfile.v2 | 1 + test/compile_test/test_compile_result.hpp | 12 +++++++++++- test/log1p_expm1_test.hpp | 1 - test/test_bessel_i.cpp | 7 +++++++ test/test_bessel_i.hpp | 2 -- test/test_bessel_j.hpp | 5 ----- test/test_bessel_k.hpp | 2 -- test/test_bessel_y.hpp | 5 ----- test/test_beta.hpp | 1 - test/test_carlson.hpp | 4 ---- test/test_cbrt.hpp | 1 - test/test_digamma.hpp | 1 - test/test_ellint_1.hpp | 4 +--- test/test_ellint_2.hpp | 4 +--- test/test_ellint_3.hpp | 2 -- test/test_erf.hpp | 3 --- test/test_expint.hpp | 2 -- test/test_gamma.cpp | 2 +- test/test_gamma.hpp | 2 -- test/test_hermite.hpp | 3 --- test/test_hypergeometric_dist.cpp | 2 -- test/test_ibeta.cpp | 2 +- test/test_ibeta.hpp | 1 - test/test_igamma.cpp | 17 ++++++++++++----- test/test_igamma.hpp | 1 - test/test_igamma_inv.hpp | 2 -- test/test_igamma_inva.hpp | 2 -- test/test_jacobi.hpp | 1 - test/test_laguerre.hpp | 2 -- test/test_legendre.hpp | 2 -- test/test_nc_beta.cpp | 2 -- test/test_skew_normal.cpp | 2 +- test/test_spherical_harmonic.cpp | 2 -- test/test_students_t.cpp | 12 ++++++------ test/test_tgamma_ratio.cpp | 8 ++++++++ test/test_tgamma_ratio.hpp | 2 -- test/test_zeta.hpp | 1 - 41 files changed, 54 insertions(+), 80 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 15966862c..02f96d420 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -13,6 +13,7 @@ project #intel-linux:off intel-darwin:off msvc-7.1:off + gcc-mingw:off #gcc:-fvisibility=hidden intel-linux:-fvisibility=hidden sun:-xldscope=hidden diff --git a/include/boost/math/distributions/inverse_gaussian.hpp b/include/boost/math/distributions/inverse_gaussian.hpp index ba8507731..0b7f30ea2 100644 --- a/include/boost/math/distributions/inverse_gaussian.hpp +++ b/include/boost/math/distributions/inverse_gaussian.hpp @@ -286,7 +286,7 @@ namespace detail // Define the distribution, using gamma_nooverflow: typedef gamma_distribution gamma_nooverflow; - gamma_distribution g(static_cast(0.5), static_cast(1.)); + gamma_nooverflow g(static_cast(0.5), static_cast(1.)); // gamma_nooverflow g(static_cast(0.5), static_cast(1.)); // R qgamma(0.2, 0.5, 1) 0.0320923 diff --git a/include/boost/math/special_functions/airy.hpp b/include/boost/math/special_functions/airy.hpp index 08f6aeec4..9a34a736a 100644 --- a/include/boost/math/special_functions/airy.hpp +++ b/include/boost/math/special_functions/airy.hpp @@ -348,7 +348,7 @@ inline T airy_ai_zero(unsigned m, const Policy& pol) policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; BOOST_STATIC_ASSERT_MSG(false == std::numeric_limits::is_integer, "Airy return type must be a floating-point type."); - return policies::checked_narrowing_cast(detail::airy_ai_zero_imp(m, pol), "boost::math::airy_ai_zero<%1%>(unsigned)"); + return policies::checked_narrowing_cast(detail::airy_ai_zero_imp(m, forwarding_policy()), "boost::math::airy_ai_zero<%1%>(unsigned)"); } template @@ -396,7 +396,7 @@ inline T airy_bi_zero(unsigned m, const Policy& pol) policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; BOOST_STATIC_ASSERT_MSG(false == std::numeric_limits::is_integer, "Airy return type must be a floating-point type."); - return policies::checked_narrowing_cast(detail::airy_bi_zero_imp(m, pol), "boost::math::airy_bi_zero<%1%>(unsigned)"); + return policies::checked_narrowing_cast(detail::airy_bi_zero_imp(m, forwarding_policy()), "boost::math::airy_bi_zero<%1%>(unsigned)"); } template diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index 40cc9efa4..43769c91a 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -1331,7 +1331,6 @@ inline typename tools::promote_args::type BOOST_FPU_EXCEPTION_GUARD typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; - typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, @@ -1349,7 +1348,6 @@ inline typename tools::promote_args::type BOOST_FPU_EXCEPTION_GUARD typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; - typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 8573f91b3..f01b18ef1 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -36,6 +36,7 @@ project msvc:/wd4189 # local variable is initialized but not referenced msvc-7.1:../vc71_fix//vc_fix msvc-7.1:off + gcc-mingw:off borland:static # msvc:/wd4506 has no effect? # suppress xstring(237) : warning C4506: no definition for inline function diff --git a/test/compile_test/test_compile_result.hpp b/test/compile_test/test_compile_result.hpp index 2171f57a2..e246c5b9a 100644 --- a/test/compile_test/test_compile_result.hpp +++ b/test/compile_test/test_compile_result.hpp @@ -28,10 +28,20 @@ inline void check_result_imp(boost::long_long_type, boost::long_long_type){} #endif inline void check_result_imp(bool, bool){} +// +// If the compiler warns about unused typedefs then enable this: +// +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) +# define BOOST_MATH_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused)) +#else +# define BOOST_MATH_ASSERT_UNUSED_ATTRIBUTE +#endif + template inline void check_result_imp(T1, T2) { - typedef int static_assertion[sizeof(T1) == 0xFFFF]; + // This is a static assertion that should always fail to compile... + typedef BOOST_MATH_ASSERT_UNUSED_ATTRIBUTE int static_assertion[sizeof(T1) == 0xFFFF]; } template diff --git a/test/log1p_expm1_test.hpp b/test/log1p_expm1_test.hpp index d6683b175..c50929dd5 100644 --- a/test/log1p_expm1_test.hpp +++ b/test/log1p_expm1_test.hpp @@ -14,7 +14,6 @@ template void do_test(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type); diff --git a/test/test_bessel_i.cpp b/test/test_bessel_i.cpp index 020f4686b..050a63055 100644 --- a/test/test_bessel_i.cpp +++ b/test/test_bessel_i.cpp @@ -74,6 +74,13 @@ void expected_results() ".*Random.*", // test data group ".*", 400, 200); // test function + add_expected_result( + "GNU.*", // compiler + ".*", // stdlib + "Win32.*", // platform + largest_type, // test type(s) + ".*Random.*", // test data group + ".*", 400, 200); // test function add_expected_result( "GNU.*", // compiler ".*", // stdlib diff --git a/test/test_bessel_i.hpp b/test/test_bessel_i.hpp index 573208dd6..ceead9084 100644 --- a/test/test_bessel_i.hpp +++ b/test/test_bessel_i.hpp @@ -32,7 +32,6 @@ T cyl_bessel_i_int_wrapper(T v, T x) template void do_test_cyl_bessel_i(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); @@ -80,7 +79,6 @@ void do_test_cyl_bessel_i(const T& data, const char* type_name, const char* test template void do_test_cyl_bessel_i_int(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); diff --git a/test/test_bessel_j.hpp b/test/test_bessel_j.hpp index f89991c66..477aeb283 100644 --- a/test/test_bessel_j.hpp +++ b/test/test_bessel_j.hpp @@ -25,7 +25,6 @@ template void do_test_cyl_bessel_j(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); @@ -78,7 +77,6 @@ T cyl_bessel_j_int_wrapper(T v, T x) template void do_test_cyl_bessel_j_int(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); @@ -107,7 +105,6 @@ void do_test_cyl_bessel_j_int(const T& data, const char* type_name, const char* template void do_test_sph_bessel_j(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(unsigned, value_type); @@ -117,8 +114,6 @@ void do_test_sph_bessel_j(const T& data, const char* type_name, const char* test pg funcp = boost::math::sph_bessel; #endif - typedef int (*cast_t)(value_type); - boost::math::tools::test_result result; std::cout << "Testing " << test_name << " with type " << type_name diff --git a/test/test_bessel_k.hpp b/test/test_bessel_k.hpp index c3ece8d0d..8da66a8ce 100644 --- a/test/test_bessel_k.hpp +++ b/test/test_bessel_k.hpp @@ -32,7 +32,6 @@ T cyl_bessel_k_int_wrapper(T v, T x) template void do_test_cyl_bessel_k(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); @@ -78,7 +77,6 @@ void do_test_cyl_bessel_k(const T& data, const char* type_name, const char* test template void do_test_cyl_bessel_k_int(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); diff --git a/test/test_bessel_y.hpp b/test/test_bessel_y.hpp index d27e54302..15a8e3e00 100644 --- a/test/test_bessel_y.hpp +++ b/test/test_bessel_y.hpp @@ -25,7 +25,6 @@ template void do_test_cyl_neumann_y(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); @@ -77,7 +76,6 @@ T cyl_neumann_int_wrapper(T v, T x) template void do_test_cyl_neumann_y_int(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); @@ -106,7 +104,6 @@ void do_test_cyl_neumann_y_int(const T& data, const char* type_name, const char* template void do_test_sph_neumann_y(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(unsigned, value_type); @@ -116,8 +113,6 @@ void do_test_sph_neumann_y(const T& data, const char* type_name, const char* tes pg funcp = boost::math::sph_neumann; #endif - typedef int (*cast_t)(value_type); - boost::math::tools::test_result result; std::cout << "Testing " << test_name << " with type " << type_name diff --git a/test/test_beta.hpp b/test/test_beta.hpp index bdb70410e..6b8754de6 100644 --- a/test/test_beta.hpp +++ b/test/test_beta.hpp @@ -35,7 +35,6 @@ template void do_test_beta(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); diff --git a/test/test_carlson.hpp b/test/test_carlson.hpp index e7515215e..7c20d11d6 100644 --- a/test/test_carlson.hpp +++ b/test/test_carlson.hpp @@ -24,7 +24,6 @@ template void do_test_ellint_rf(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; @@ -50,7 +49,6 @@ void do_test_ellint_rf(T& data, const char* type_name, const char* test) template void do_test_ellint_rc(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; @@ -76,7 +74,6 @@ void do_test_ellint_rc(T& data, const char* type_name, const char* test) template void do_test_ellint_rj(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; @@ -102,7 +99,6 @@ void do_test_ellint_rj(T& data, const char* type_name, const char* test) template void do_test_ellint_rd(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; diff --git a/test/test_cbrt.hpp b/test/test_cbrt.hpp index b3351251b..1c3cb51c1 100644 --- a/test/test_cbrt.hpp +++ b/test/test_cbrt.hpp @@ -38,7 +38,6 @@ struct negative_cbrt template void do_test_cbrt(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type); diff --git a/test/test_digamma.hpp b/test/test_digamma.hpp index dd7a2bc41..ea72f4875 100644 --- a/test/test_digamma.hpp +++ b/test/test_digamma.hpp @@ -22,7 +22,6 @@ template void do_test_digamma(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type); diff --git a/test/test_ellint_1.hpp b/test/test_ellint_1.hpp index 14744b23d..bd0aaa589 100644 --- a/test/test_ellint_1.hpp +++ b/test/test_ellint_1.hpp @@ -27,7 +27,6 @@ template void do_test_ellint_f(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; @@ -53,8 +52,7 @@ void do_test_ellint_f(T& data, const char* type_name, const char* test) template void do_test_ellint_k(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; - typedef Real value_type; + typedef Real value_type; boost::math::tools::test_result result; std::cout << "Testing: " << test << std::endl; diff --git a/test/test_ellint_2.hpp b/test/test_ellint_2.hpp index b104f9743..e13461911 100644 --- a/test/test_ellint_2.hpp +++ b/test/test_ellint_2.hpp @@ -27,7 +27,6 @@ template void do_test_ellint_e2(const T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; @@ -52,8 +51,7 @@ void do_test_ellint_e2(const T& data, const char* type_name, const char* test) template void do_test_ellint_e1(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; - typedef Real value_type; + typedef Real value_type; boost::math::tools::test_result result; std::cout << "Testing: " << test << std::endl; diff --git a/test/test_ellint_3.hpp b/test/test_ellint_3.hpp index ed981448c..cac9e09b1 100644 --- a/test/test_ellint_3.hpp +++ b/test/test_ellint_3.hpp @@ -28,7 +28,6 @@ template void do_test_ellint_pi3(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; @@ -54,7 +53,6 @@ void do_test_ellint_pi3(T& data, const char* type_name, const char* test) template void do_test_ellint_pi2(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; diff --git a/test/test_erf.hpp b/test/test_erf.hpp index f166bdd1a..ed5c76989 100644 --- a/test/test_erf.hpp +++ b/test/test_erf.hpp @@ -25,7 +25,6 @@ template void do_test_erf(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type); @@ -87,7 +86,6 @@ void do_test_erf(const T& data, const char* type_name, const char* test_name) template void do_test_erf_inv(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type); @@ -114,7 +112,6 @@ void do_test_erf_inv(const T& data, const char* type_name, const char* test_name template void do_test_erfc_inv(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type); diff --git a/test/test_expint.hpp b/test/test_expint.hpp index 6f8e4bd1e..57d142a1b 100644 --- a/test/test_expint.hpp +++ b/test/test_expint.hpp @@ -46,7 +46,6 @@ void do_test_expint(const T& data, const char* type_name, const char* test_name) // test En(T) against data: // using namespace std; - typedef typename T::value_type row_type; typedef Real value_type; std::cout << test_name << " with type " << type_name << std::endl; @@ -91,7 +90,6 @@ void do_test_expint_Ei(const T& data, const char* type_name, const char* test_na // test Ei(T) against data: // using namespace std; - typedef typename T::value_type row_type; typedef Real value_type; std::cout << test_name << " with type " << type_name << std::endl; diff --git a/test/test_gamma.cpp b/test/test_gamma.cpp index 7d9943110..a3edb2803 100644 --- a/test/test_gamma.cpp +++ b/test/test_gamma.cpp @@ -76,7 +76,7 @@ void expected_results() "Win32.*", // platform "real_concept", // test type(s) "factorials", // test data group - "boost::math::tgamma", 200, 100); // test function + "boost::math::tgamma", 250, 100); // test function add_expected_result( "GNU.*", // compiler ".*", // stdlib diff --git a/test/test_gamma.hpp b/test/test_gamma.hpp index 1b17b25c8..d33665f3e 100644 --- a/test/test_gamma.hpp +++ b/test/test_gamma.hpp @@ -29,7 +29,6 @@ template void do_test_gamma(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type); @@ -92,7 +91,6 @@ void do_test_gamma(const T& data, const char* type_name, const char* test_name) template void do_test_gammap1m1(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type); diff --git a/test/test_hermite.hpp b/test/test_hermite.hpp index 4046b8ef3..a0f0c0cb8 100644 --- a/test/test_hermite.hpp +++ b/test/test_hermite.hpp @@ -31,7 +31,6 @@ template void do_test_hermite(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(unsigned, value_type); @@ -41,8 +40,6 @@ void do_test_hermite(const T& data, const char* type_name, const char* test_name pg funcp = boost::math::hermite; #endif - typedef unsigned (*cast_t)(value_type); - boost::math::tools::test_result result; std::cout << "Testing " << test_name << " with type " << type_name diff --git a/test/test_hypergeometric_dist.cpp b/test/test_hypergeometric_dist.cpp index 3f478119c..49491e49f 100644 --- a/test/test_hypergeometric_dist.cpp +++ b/test/test_hypergeometric_dist.cpp @@ -147,7 +147,6 @@ void do_test_hypergeometric(const T& data, const char* type_name, const char* te (void)test_name; #if !defined(TEST_QUANT) || (TEST_QUANT == 0) - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type, value_type, value_type); @@ -207,7 +206,6 @@ void do_test_hypergeometric(const T& data, const char* type_name, const char* te template void do_test_hypergeometric_quantile(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Checking quantiles with " << test_name << " with type " << type_name diff --git a/test/test_ibeta.cpp b/test/test_ibeta.cpp index 758094416..584c37b1f 100644 --- a/test/test_ibeta.cpp +++ b/test/test_ibeta.cpp @@ -231,7 +231,7 @@ void expected_results() "[^|]*", // platform largest_type, // test type(s) "(?i).*medium.*", // test data group - ".*", 150, 50); // test function + ".*", 350, 50); // test function add_expected_result( "[^|]*", // compiler "[^|]*", // stdlib diff --git a/test/test_ibeta.hpp b/test/test_ibeta.hpp index eb1e26eb8..f58e77e15 100644 --- a/test/test_ibeta.hpp +++ b/test/test_ibeta.hpp @@ -27,7 +27,6 @@ template void do_test_beta(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type, value_type); diff --git a/test/test_igamma.cpp b/test/test_igamma.cpp index 72c95bbf0..c2bea0bad 100644 --- a/test/test_igamma.cpp +++ b/test/test_igamma.cpp @@ -197,13 +197,20 @@ void expected_results() // // Minw: // + add_expected_result( + "GNU[^|]*", // compiler + "[^|]*", // stdlib + "Win32[^|]*", // platform + "real_concept", // test type(s) + "[^|]*medium[^|]*", // test data group + "[^|]*", 700, 200); // test function add_expected_result( "GNU[^|]*", // compiler "[^|]*", // stdlib "Win32[^|]*", // platform largest_type, // test type(s) "[^|]*medium[^|]*", // test data group - "[^|]*", 200, 100); // test function + "[^|]*", 700, 200); // test function add_expected_result( "GNU[^|]*", // compiler "[^|]*", // stdlib @@ -215,16 +222,16 @@ void expected_results() "GNU[^|]*", // compiler "[^|]*", // stdlib "Win32[^|]*", // platform - "real_concept", // test type(s) - "[^|]*medium[^|]*", // test data group - "[^|]*", 400, 100); // test function + largest_type, // test type(s) + "[^|]*integer[^|]*", // test data group + ".*", 120, 50); // test function add_expected_result( "GNU[^|]*", // compiler "[^|]*", // stdlib "Win32[^|]*", // platform "real_concept", // test type(s) "[^|]*integer[^|]*", // test data group - ".*", 80, 50); // test function + ".*", 100, 50); // test function // // Large exponent range causes more extreme test cases to be evaluated: diff --git a/test/test_igamma.hpp b/test/test_igamma.hpp index 9a36d6d5b..ce805bd42 100644 --- a/test/test_igamma.hpp +++ b/test/test_igamma.hpp @@ -29,7 +29,6 @@ template void do_test_gamma_2(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); diff --git a/test/test_igamma_inv.hpp b/test/test_igamma_inv.hpp index cbf1a5fba..1a5c56e95 100644 --- a/test/test_igamma_inv.hpp +++ b/test/test_igamma_inv.hpp @@ -46,7 +46,6 @@ void do_test_gamma_2(const T& data, const char* type_name, const char* test_name // test gamma_p_inv(T, T) against data: // using namespace std; - typedef typename T::value_type row_type; typedef Real value_type; std::cout << test_name << " with type " << type_name << std::endl; @@ -116,7 +115,6 @@ void do_test_gamma_2(const T& data, const char* type_name, const char* test_name template void do_test_gamma_inv(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); diff --git a/test/test_igamma_inva.hpp b/test/test_igamma_inva.hpp index edd53385b..00f0f291e 100644 --- a/test/test_igamma_inva.hpp +++ b/test/test_igamma_inva.hpp @@ -46,7 +46,6 @@ void do_test_gamma_2(const T& data, const char* type_name, const char* test_name // test gamma_p_inva(T, T) against data: // using namespace std; - typedef typename T::value_type row_type; typedef Real value_type; std::cout << test_name << " with type " << type_name << std::endl; @@ -116,7 +115,6 @@ void do_test_gamma_2(const T& data, const char* type_name, const char* test_name template void do_test_gamma_inva(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); diff --git a/test/test_jacobi.hpp b/test/test_jacobi.hpp index 06d611eea..1359b3c7f 100644 --- a/test/test_jacobi.hpp +++ b/test/test_jacobi.hpp @@ -29,7 +29,6 @@ template void do_test_sn(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; diff --git a/test/test_laguerre.hpp b/test/test_laguerre.hpp index 48a91d3be..cfd211189 100644 --- a/test/test_laguerre.hpp +++ b/test/test_laguerre.hpp @@ -24,7 +24,6 @@ template void do_test_laguerre2(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(unsigned, value_type); @@ -54,7 +53,6 @@ void do_test_laguerre2(const T& data, const char* type_name, const char* test_na template void do_test_laguerre3(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(unsigned, unsigned, value_type); diff --git a/test/test_legendre.hpp b/test/test_legendre.hpp index 3831a6e96..f10b7440b 100644 --- a/test/test_legendre.hpp +++ b/test/test_legendre.hpp @@ -28,7 +28,6 @@ template void do_test_legendre_p(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(int, value_type); @@ -95,7 +94,6 @@ void do_test_legendre_p(const T& data, const char* type_name, const char* test_n template void do_test_assoc_legendre_p(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(int, int, value_type); diff --git a/test/test_nc_beta.cpp b/test/test_nc_beta.cpp index e03542c0b..a524a4107 100644 --- a/test/test_nc_beta.cpp +++ b/test/test_nc_beta.cpp @@ -295,7 +295,6 @@ T nc_beta_ccdf(T a, T b, T nc, T x) template void do_test_nc_chi_squared(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; std::cout << "Testing: " << test << std::endl; @@ -334,7 +333,6 @@ void do_test_nc_chi_squared(T& data, const char* type_name, const char* test) template void quantile_sanity_check(T& data, const char* type_name, const char* test) { - typedef typename T::value_type row_type; typedef Real value_type; // diff --git a/test/test_skew_normal.cpp b/test/test_skew_normal.cpp index 6410c5d9a..91a7216a6 100644 --- a/test/test_skew_normal.cpp +++ b/test/test_skew_normal.cpp @@ -337,7 +337,7 @@ void test_spots(RealType) BOOST_CHECK_CLOSE( // mean: mean(dist) - , static_cast(-0.579908992539856825862549L), tol100); + , static_cast(-0.579908992539856825862549L), tol100 * 2); BOOST_CHECK_CLOSE( // variance: variance(dist) , static_cast(2.0179057767837232633904L), tol100); diff --git a/test/test_spherical_harmonic.cpp b/test/test_spherical_harmonic.cpp index 9ee2b4331..0d2b338ca 100644 --- a/test/test_spherical_harmonic.cpp +++ b/test/test_spherical_harmonic.cpp @@ -101,7 +101,6 @@ void expected_results() template void do_test_spherical_harmonic(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(unsigned, int, value_type, value_type); @@ -145,7 +144,6 @@ void do_test_spherical_harmonic(const T& data, const char* type_name, const char template void test_complex_spherical_harmonic(const T& data, const char* /* name */, boost::mpl::true_ const &) { - typedef typename T::value_type row_type; typedef Real value_type; for(unsigned i = 0; i < sizeof(data) / sizeof(data[0]); ++i) diff --git a/test/test_students_t.cpp b/test/test_students_t.cpp index 324441842..92259d3a8 100644 --- a/test/test_students_t.cpp +++ b/test/test_students_t.cpp @@ -367,19 +367,19 @@ void test_spots(RealType) students_t_distribution(1e20f), static_cast(0.25f))), static_cast(0.25f), tolerance); BOOST_CHECK_CLOSE(boost::math::cdf( - students_t_distribution(0x7FFFFFFF), + students_t_distribution(static_cast(0x7FFFFFFF)), boost::math::quantile( - students_t_distribution(0x7FFFFFFF), static_cast(0.25f))), + students_t_distribution(static_cast(0x7FFFFFFF)), static_cast(0.25f))), static_cast(0.25f), tolerance); BOOST_CHECK_CLOSE(boost::math::cdf( - students_t_distribution(0x10000000), + students_t_distribution(static_cast(0x10000000)), boost::math::quantile( - students_t_distribution(0x10000000), static_cast(0.25f))), + students_t_distribution(static_cast(0x10000000)), static_cast(0.25f))), static_cast(0.25f), tolerance); BOOST_CHECK_CLOSE(boost::math::cdf( - students_t_distribution(0x0fffffff), + students_t_distribution(static_cast(0x0fffffff)), boost::math::quantile( - students_t_distribution(0x0fffffff), static_cast(0.25f))), + students_t_distribution(static_cast(0x0fffffff)), static_cast(0.25f))), static_cast(0.25f), tolerance); } diff --git a/test/test_tgamma_ratio.cpp b/test/test_tgamma_ratio.cpp index be2276e0d..aa7ab7e76 100644 --- a/test/test_tgamma_ratio.cpp +++ b/test/test_tgamma_ratio.cpp @@ -77,6 +77,14 @@ void expected_results() "real_concept", // test type(s) "[^|]*", // test data group "boost::math::tgamma_ratio[^|]*", 300, 100); // test function + + add_expected_result( + "GNU.*", // compiler + "[^|]*", // stdlib + "Win32.*", // platform + largest_type, // test type(s) + "[^|]*", // test data group + "boost::math::tgamma_ratio[^|]*", 300, 100); // test function // // Catch all cases come last: // diff --git a/test/test_tgamma_ratio.hpp b/test/test_tgamma_ratio.hpp index dc7eddb51..c762d1b9a 100644 --- a/test/test_tgamma_ratio.hpp +++ b/test/test_tgamma_ratio.hpp @@ -36,7 +36,6 @@ struct negative_tgamma_ratio template void do_test_tgamma_delta_ratio(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); @@ -69,7 +68,6 @@ void do_test_tgamma_delta_ratio(const T& data, const char* type_name, const char template void do_test_tgamma_ratio(const T& data, const char* type_name, const char* test_name) { - typedef typename T::value_type row_type; typedef Real value_type; typedef value_type (*pg)(value_type, value_type); diff --git a/test/test_zeta.hpp b/test/test_zeta.hpp index ff27270d5..9579bb1d3 100644 --- a/test/test_zeta.hpp +++ b/test/test_zeta.hpp @@ -31,7 +31,6 @@ void do_test_zeta(const T& data, const char* type_name, const char* test_name) // test zeta(T) against data: // using namespace std; - typedef typename T::value_type row_type; typedef Real value_type; std::cout << test_name << " with type " << type_name << std::endl;