From 10026d9b6fcb3ad592bbe56669a868f916818524 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 9 Jun 2017 19:47:18 +0100 Subject: [PATCH] Disable some tests on older compilers that we know won't pass. --- test/common_factor_test.cpp | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/test/common_factor_test.cpp b/test/common_factor_test.cpp index 131c78c..fa12338 100644 --- a/test/common_factor_test.cpp +++ b/test/common_factor_test.cpp @@ -23,7 +23,6 @@ #include // for boost::mpl::list #include #include -#include #include #include @@ -35,6 +34,13 @@ #include #endif +#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1500)) || (defined(__clang_major__) && (__clang_major__ == 3) && (__clang_minor__ < 2)) +#define DISABLE_MP_TESTS +#endif + +#ifndef DISABLE_MP_TESTS +#include +#endif namespace { @@ -124,7 +130,11 @@ typedef ::boost::mpl::list signed_test_types; + MyInt1 +#ifndef DISABLE_MP_TESTS + , boost::multiprecision::cpp_int +#endif +> signed_test_types; typedef ::boost::mpl::list void gcd_and_lcm_on_rationals() rational(1)); } +#ifndef DISABLE_MP_TESTS #define TEST_SIGNED_( test ) \ test(); \ test(); \ @@ -558,6 +569,14 @@ template void gcd_and_lcm_on_rationals() test(); \ test(); \ test(); +#else +#define TEST_SIGNED_( test ) \ + test(); \ + test(); \ + test(); \ + test(); \ + test(); +#endif #ifdef BOOST_HAS_LONG_LONG # define TEST_SIGNED__( test ) \ @@ -568,7 +587,7 @@ template void gcd_and_lcm_on_rationals() TEST_SIGNED_( test ) \ test<__int64>(); #endif - +#ifndef DISABLE_MP_TESTS #define TEST_UNSIGNED_( test ) \ test(); \ test(); \ @@ -577,6 +596,15 @@ template void gcd_and_lcm_on_rationals() test(); \ test(); \ test(); +#else +#define TEST_UNSIGNED_( test ) \ + test(); \ + test(); \ + test(); \ + test(); \ + test(); \ + test(); +#endif #ifdef BOOST_HAS_LONG_LONG # define TEST_UNSIGNED( test ) \