# copyright John Maddock 2011 # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt. import testing ; import modules ; import path ; import ../../config/checks/config : requires ; local ntl-path = [ modules.peek : NTL_PATH ] ; local gmp_path = [ modules.peek : GMP_PATH ] ; local mpfr_path = [ modules.peek : MPFR_PATH ] ; local mpfi_path = [ modules.peek : MPFI_PATH ] ; local tommath_path = [ modules.peek : TOMMATH_PATH ] ; ####################################################################################### # # NOTE: Because these tests take a fair while to build and run, they are split up into # multiple smaller test suites which are: # # arithmetic_tests # functions_and_limits # conversions # cpp_int_tests # misc # specfun # compile_fail # concepts # examples # # You can run an individual suite by passing it's name to b2 on the command line. # Or you can run all except the "specfun" tests (which are very slow) by not specifying anything. # # Please make sure that any new tests are added to one of the test suites, and that the # build times for the various suites are reasonably balanced: otherwise the CI builds # will time out if one suite contains too many. # ####################################################################################################### path-constant here : . ; project : requirements $(gmp_path) $(gmp_path)/mpfr $(gmp_path)/gmpfrxx $(mpfr_path) $(mpfi_path) $(mpfi_path)/src $(tommath_path) ../include ../../.. # We set these to make it easier to set up and test GMP and MPFR under Win32: msvc:static msvc:static msvc:all msvc:/fp\:precise intel-win:static intel-win:static clang-win:static # Assembler error "File too big" caused by lots of C++ templates, for example, math/floating_point_examples.cpp. # Some projects on some toolsets may require # gcc-mingw:\"-Wa,-mbig-obj\" # See https://digitalkarabela.com/mingw-w64-how-to-fix-file-too-big-too-many-sections/ # gcc-mingw:-Wa,-mbig-obj # Some projects may overflow assembler and require equivalent of MSVC /bigobj. # Requires version 2.30 of GNU binutils. # Best applied only to projects that require this, see multiprecision/example run math/floating_point_examples.cpp. # Speed up compiles: msvc:off intel:off gcc:-Wall gcc:-Wextra intel:SLOW_COMPILER msvc,off:-RTC1 # We can't yet enable this - it breaks the STL in some tests... #msvc,off:-RTCc #msvc,off:_ALLOW_RTCc_IN_STL ; local enable-specfun = [ MATCH (--enable-specfun) : [ modules.peek : ARGV ] ] ; local disable-concepts = [ MATCH (--disable-concepts) : [ modules.peek : ARGV ] ] ; lib gmp : : $(gmp_path) ; lib mpfr : : $(gmp_path) $(mpfr_path) $(mpfr_path)/build.vc10/lib/Win32/Debug ; lib mpfi : : $(gmp_path) $(mpfr_path) $(mpfr_path)/build.vc10/lib/Win32/Debug $(mpfi_path) $(mpfi_path)/src ; lib quadmath ; lib mpc ; if $(tommath_path) { lib tommath : [ GLOB $(tommath_path) : *.c ] ; TOMMATH = tommath ; } else { lib tommath : : $(tommath_path) ; TOMMATH = tommath ; } lib no_eh_support : no_eh_test_support.cpp ; test-suite arithmetic_tests : [ run test_arithmetic_backend_concept.cpp no_eh_support ] [ run test_arithmetic_cpp_dec_float_1.cpp no_eh_support ] [ run test_arithmetic_cpp_dec_float_2.cpp no_eh_support ] [ run test_arithmetic_cpp_dec_float_3.cpp no_eh_support ] [ run test_arithmetic_cpp_dec_float_3m.cpp no_eh_support ] [ run test_arithmetic_cpp_bin_float_1.cpp no_eh_support ] [ run test_arithmetic_cpp_bin_float_2.cpp no_eh_support ] [ run test_arithmetic_cpp_bin_float_2m.cpp no_eh_support ] [ run test_arithmetic_cpp_bin_float_3.cpp no_eh_support ] [ run test_arithmetic_mpf_50.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : no ] ] [ run test_arithmetic_mpf.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : no ] ] [ run test_arithmetic_mpz.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : no ] ] [ run test_arithmetic_mpz_rat.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : no ] ] [ run test_arithmetic_mpz_br.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : no ] ] [ run test_arithmetic_mpq.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : no ] ] [ run test_arithmetic_mpfr.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : no ] ] [ run test_arithmetic_mpfr_50.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : no ] ] [ run test_arithmetic_mpfr_50_static.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : no ] ] [ run test_arithmetic_tommath.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : no ] ] [ run test_arithmetic_tommath_rat.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : no ] ] [ run test_arithmetic_tommath_br.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : no ] ] [ run test_arithmetic_cpp_int_1.cpp no_eh_support : : : msvc:-bigobj ] [ run test_arithmetic_cpp_int_2.cpp no_eh_support ] [ run test_arithmetic_cpp_int_3.cpp no_eh_support ] [ run test_arithmetic_cpp_int_4.cpp no_eh_support ] [ run test_arithmetic_cpp_int_5.cpp no_eh_support ] [ run test_arithmetic_cpp_int_6.cpp no_eh_support ] [ run test_arithmetic_cpp_int_7.cpp no_eh_support ] [ run test_arithmetic_cpp_int_8.cpp no_eh_support ] [ run test_arithmetic_cpp_int_9.cpp no_eh_support ] [ run test_arithmetic_cpp_int_10.cpp no_eh_support ] [ run test_arithmetic_cpp_int_11.cpp no_eh_support ] [ run test_arithmetic_cpp_int_12.cpp no_eh_support ] [ run test_arithmetic_cpp_int_13.cpp no_eh_support ] [ run test_arithmetic_cpp_int_14.cpp no_eh_support ] [ run test_arithmetic_cpp_int_15.cpp no_eh_support ] [ run test_arithmetic_cpp_int_16.cpp no_eh_support ] [ run test_arithmetic_cpp_int_17.cpp no_eh_support ] [ run test_arithmetic_cpp_int_18.cpp no_eh_support ] [ run test_arithmetic_cpp_int_19.cpp no_eh_support ] [ run test_arithmetic_cpp_int_br.cpp no_eh_support ] [ run test_arithmetic_ab_1.cpp no_eh_support ] [ run test_arithmetic_ab_2.cpp no_eh_support ] [ run test_arithmetic_ab_3.cpp no_eh_support ] [ run test_cpp_dec_float_round.cpp no_eh_support ] [ run test_arithmetic_logged_1.cpp no_eh_support ] [ run test_arithmetic_logged_2.cpp no_eh_support ] [ run test_arithmetic_dbg_adptr1.cpp no_eh_support ] [ run test_arithmetic_dbg_adptr1m.cpp no_eh_support ] [ run test_arithmetic_dbg_adptr2.cpp no_eh_support ] [ run test_arithmetic_mpfi_50.cpp mpfi mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfi : : no ] ] [ run test_arithmetic_float_128.cpp quadmath no_eh_support : : : [ check-target-builds ../config//has_float128 : : no ] ] [ run test_arithmetic_float_128.cpp no_eh_support : : : [ check-target-builds ../config//has_intel_quad : -Qoption,cpp,--extended_float_type : no ] [ check-target-builds ../config//has_float128 : quadmath ] : test_arithmetic_intel_quad ] [ run test_arithmetic_mpc.cpp mpc mpfr gmp : : : [ check-target-builds ../config//has_mpc : : no ] ] [ run test_mpfr_mpc_precisions.cpp mpc mpfr gmp : : : [ check-target-builds ../config//has_mpc : : no ] ] [ run test_mpfi_precisions.cpp mpfi mpfr gmp : : : [ check-target-builds ../config//has_mpfi : : no ] ] [ run test_mpf_precisions.cpp gmp : : : [ check-target-builds ../config//has_gmp : : no ] ] [ run test_complex.cpp : : : [ check-target-builds ../config//has_mpc : TEST_MPC mpc mpfr gmp ] [ check-target-builds ../config//has_float128 : quadmath ] ] [ run test_arithmetic_complex_adaptor.cpp ] [ run test_arithmetic_complex_adaptor_2.cpp ] [ run test_arithmetic_complex128.cpp : : : [ check-target-builds ../config//has_float128 : quadmath ] ] ; rule get_function_tests { local result ; for local source in test_exp.cpp test_log.cpp test_pow.cpp test_sinh.cpp test_sqrt.cpp test_cosh.cpp test_tanh.cpp test_sin.cpp test_cos.cpp test_tan.cpp test_asin.cpp test_acos.cpp test_atan.cpp test_round.cpp test_fpclassify.cpp test_sf_import_c99.cpp { result += [ run $(source) gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] TEST_MPF_50 : $(source:B)_mpf50 ] ; result += [ run $(source) mpfr gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_mpfr : : no ] TEST_MPFR_50 : $(source:B)_mpfr50 ] ; result += [ run $(source) mpfi mpfr gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_mpfi : : no ] TEST_MPFI_50 : $(source:B)_mpfi50 ] ; result += [ run $(source) no_eh_support : # command line : # input files : # requirements TEST_CPP_DEC_FLOAT : $(source:B)_cpp_dec_float ] ; result += [ run $(source) no_eh_support : # command line : # input files : # requirements TEST_CPP_BIN_FLOAT : $(source:B)_cpp_bin_float ] ; result += [ run $(source) quadmath no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_float128 : : no ] TEST_FLOAT128 : $(source:B)_float128 ] ; result += [ run $(source) no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_intel_quad : -Qoption,cpp,--extended_float_type : no ] [ check-target-builds ../config//has_float128 : quadmath ] TEST_FLOAT128 : $(source:B)_intel_quad ] ; } return $(result) ; } test-suite functions_and_limits : [ run test_numeric_limits.cpp no_eh_support : # command line : # input files : # requirements TEST_BACKEND : test_numeric_limits_backend_concept ] [ run test_numeric_limits.cpp gmp no_eh_support : # command line : # input files : # requirements TEST_MPF_50 [ check-target-builds ../config//has_gmp : : no ] : test_numeric_limits_mpf50 ] [ run test_numeric_limits.cpp gmp no_eh_support : # command line : # input files : # requirements TEST_MPF [ check-target-builds ../config//has_gmp : : no ] : test_numeric_limits_mpf ] [ run test_numeric_limits.cpp gmp no_eh_support : # command line : # input files : # requirements TEST_MPZ [ check-target-builds ../config//has_gmp : : no ] : test_numeric_limits_mpz ] [ run test_numeric_limits.cpp gmp no_eh_support : # command line : # input files : # requirements TEST_MPQ [ check-target-builds ../config//has_gmp : : no ] : test_numeric_limits_mpq ] [ run test_numeric_limits.cpp mpfr gmp no_eh_support : # command line : # input files : # requirements TEST_MPFR [ check-target-builds ../config//has_mpfr : : no ] : test_numeric_limits_mpfr ] [ run test_numeric_limits.cpp mpfr gmp no_eh_support : # command line : # input files : # requirements TEST_MPFR_50 [ check-target-builds ../config//has_mpfr : : no ] : test_numeric_limits_mpfr_50 ] [ run test_numeric_limits.cpp no_eh_support : # command line : # input files : # requirements TEST_CPP_DEC_FLOAT : test_numeric_limits_cpp_dec_float ] [ run test_numeric_limits.cpp no_eh_support : # command line : # input files : # requirements TEST_CPP_BIN_FLOAT : test_numeric_limits_cpp_bin_float ] [ run test_numeric_limits.cpp $(TOMMATH) no_eh_support : # command line : # input files : # requirements TEST_TOMMATH [ check-target-builds ../config//has_tommath : : no ] : test_numeric_limits_tommath ] [ run test_numeric_limits.cpp no_eh_support : # command line : # input files : # requirements TEST_CPP_INT : test_numeric_limits_cpp_int ] [ run test_numeric_limits.cpp mpfi mpfr gmp no_eh_support : # command line : # input files : # requirements TEST_MPFI_50 [ check-target-builds ../config//has_mpfi : : no ] : test_numeric_limits_mpfi_50 ] [ run test_numeric_limits.cpp quadmath no_eh_support : # command line : # input files : # requirements TEST_FLOAT128 [ check-target-builds ../config//has_float128 : : no ] : test_numeric_limits_float128 ] [ run test_numeric_limits.cpp no_eh_support : # command line : # input files : # requirements TEST_FLOAT128 [ check-target-builds ../config//has_intel_quad : -Qoption,cpp,--extended_float_type : no ] [ check-target-builds ../config//has_float128 : quadmath ] : test_numeric_limits_intel_quad ] [ run test_sf_import_c99.cpp : : : TEST_CPP_DEC_FLOAT_2 : test_sf_import_c99_cpp_dec_float_2 ] [ run test_sf_import_c99.cpp : : : TEST_CPP_DEC_FLOAT_3 : test_sf_import_c99_cpp_dec_float_3 ] [ run test_sf_import_c99.cpp : : : TEST_CPP_DEC_FLOAT_4 : test_sf_import_c99_cpp_dec_float_4 ] [ run test_sf_import_c99.cpp : : : TEST_CPP_DEC_FLOAT_5 : test_sf_import_c99_cpp_dec_float_5 ] [ run test_sf_import_c99.cpp : : : TEST_CPP_DEC_FLOAT_6 : test_sf_import_c99_cpp_dec_float_6 ] [ run test_sf_import_c99.cpp : : : TEST_CPP_BIN_FLOAT_2 : test_sf_import_c99_cpp_bin_float_2 ] [ run test_sf_import_c99.cpp : : : TEST_CPP_BIN_FLOAT_2 : test_sf_import_c99_cpp_bin_float_3 ] [ run test_move.cpp mpfr gmp no_eh_support : # command line : # input files : # requirements TEST_MPFR [ check-target-builds ../config//has_mpfr : : no ] : test_move_mpfr ] [ run test_move.cpp mpc mpfr gmp no_eh_support : # command line : # input files : # requirements TEST_MPC [ check-target-builds ../config//has_mpc : : no ] : test_move_mpc ] [ run test_move.cpp gmp no_eh_support : # command line : # input files : # requirements TEST_GMP [ check-target-builds ../config//has_gmp : : no ] : test_move_gmp ] [ run test_move.cpp $(TOMMATH) no_eh_support : # command line : # input files : # requirements TEST_TOMMATH [ check-target-builds ../config//has_tommath : : no ] : test_move_tommath ] [ run test_move.cpp no_eh_support : # command line : # input files : # requirements TEST_CPP_INT : test_move_cpp_int ] [ get_function_tests ] ; test-suite conversions : [ run test_gmp_conversions.cpp gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] ] [ run test_mpfr_conversions.cpp gmp mpfr no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_mpfr : : no ] ] [ run test_mpc_conversions.cpp gmp mpfr mpc no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_mpc : : no ] ] [ run test_constants.cpp gmp no_eh_support : # command line : # input files : # requirements TEST_MPF_50 [ check-target-builds ../config//has_gmp : : no ] : test_constants_mpf50 ] [ run test_constants.cpp mpfr gmp no_eh_support : # command line : # input files : # requirements TEST_MPFR_50 [ check-target-builds ../config//has_mpfr : : no ] : test_constants_mpfr_50 ] [ run test_constants.cpp no_eh_support : # command line : # input files : # requirements TEST_CPP_DEC_FLOAT : test_constants_cpp_dec_float ] [ run test_test.cpp ] [ run test_cpp_int_lit.cpp no_eh_support ] # # Interconversion tests: # [ run test_convert_from_cpp_int.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_mpz_int.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_tom_int.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_cpp_rational.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_gmp_rational.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_tom_rational.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_cpp_bin_float.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_cpp_dec_float.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_mpf_float.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_mpfr_float.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_mpfi_float.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_convert_from_float128.cpp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : HAS_GMP gmp : ] [ check-target-builds ../config//has_mpfr : HAS_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : HAS_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : HAS_TOMMATH tommath : ] [ check-target-builds ../config//has_float128 : HAS_FLOAT128 quadmath : ] ] [ run test_cpp_bin_float_conv.cpp ] [ run test_cpp_bin_float_io.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono : # command line : # input files : # requirements TEST_CPP_BIN_FLOAT TEST1 release # Otherwise [ runtime is slow : test_cpp_bin_float_io_1 ] [ run test_cpp_bin_float_io.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono : # command line : # input files : # requirements TEST_CPP_BIN_FLOAT TEST2 release # Otherwise [ runtime is slow : test_cpp_bin_float_io_2 ] [ run test_cpp_bin_float.cpp no_eh_support mpfr gmp /boost/system//boost_system /boost/chrono//boost_chrono : # command line : # input files : # requirements TEST_MPFR [ check-target-builds ../config//has_mpfr : : no ] release # Otherwise [ runtime is slow ] [ run test_float_io.cpp no_eh_support : # command line : # input files : # requirements TEST_CPP_DEC_FLOAT release # Otherwise [ runtime is slow : test_float_io_cpp_dec_float ] [ run test_float_io.cpp gmp no_eh_support : # command line : # input files : # requirements TEST_MPF_50 release # Otherwise [ runtime is slow [ check-target-builds ../config//has_gmp : : no ] : test_float_io_mpf ] [ run test_float_io.cpp mpfr gmp no_eh_support : # command line : # input files : # requirements TEST_MPFR_50 release # Otherwise [ runtime is slow [ check-target-builds ../config//has_mpfr : : no ] : test_float_io_mpfr ] [ run test_float_io.cpp mpfi mpfr gmp no_eh_support : # command line : # input files : # requirements TEST_MPFI_50 release # Otherwise [ runtime is slow [ check-target-builds ../config//has_mpfi : : no ] : test_float_io_mpfi ] [ run test_float_io.cpp quadmath no_eh_support : # command line : # input files : # requirements TEST_FLOAT128 release # Otherwise [ runtime is slow [ check-target-builds ../config//has_float128 : : no ] : test_float_io_float128 ] [ run test_float_io.cpp no_eh_support : # command line : # input files : # requirements TEST_FLOAT128 release # Otherwise [ runtime is slow [ check-target-builds ../config//has_intel_quad : -Qoption,cpp,--extended_float_type : no ] [ check-target-builds ../config//has_float128 : quadmath ] : test_float_io_intel_quad ] [ run test_int_io.cpp no_eh_support $(TOMMATH) : # command line : # input files : # requirements TEST_TOMMATH release # Otherwise [ runtime is slow [ check-target-builds ../config//has_tommath : : no ] : test_int_io_tommath ] [ run test_int_io.cpp no_eh_support gmp : # command line : # input files : # requirements TEST_MPZ release # Otherwise [ runtime is slow [ check-target-builds ../config//has_gmp : : no ] : test_int_io_mpz ] ; test-suite cpp_int_tests : [ run test_int_io.cpp no_eh_support : # command line : # input files : # requirements TEST_CPP_INT release # Otherwise [ runtime is slow : test_int_io_cpp_int ] [ run test_cpp_int_left_shift.cpp gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] release # otherwise [ runtime is too slow!! ] [ run test_cpp_int.cpp gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] release # otherwise [ runtime is too slow!! TEST1 : test_cpp_int_1 ] [ run test_cpp_int.cpp gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] release # otherwise [ runtime is too slow!! TEST2 : test_cpp_int_2 ] [ run test_cpp_int.cpp gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] release # otherwise [ runtime is too slow!! TEST3 : test_cpp_int_3 ] [ run test_cpp_int.cpp gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] release # otherwise [ runtime is too slow!! TEST4 : test_cpp_int_4 ] [ run test_cpp_int.cpp gmp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] release # otherwise [ runtime is too slow!! TEST5 : test_cpp_int_5 ] [ run test_checked_cpp_int.cpp no_eh_support ] [ run test_unchecked_cpp_int.cpp no_eh_support : : : release ] [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release TEST1 gcc-mingw:static : test_cpp_int_serial_1 ] [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release TEST2 gcc-mingw:static : test_cpp_int_serial_2 ] [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release TEST3 gcc-mingw:static : test_cpp_int_serial_3 ] [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release TEST4 gcc-mingw:static : test_cpp_int_serial_4 ] [ run test_cpp_int_deserial.cpp ../../serialization/build//boost_serialization ../../filesystem/build//boost_filesystem : $(here)/serial_txts : : release gcc-mingw:static ] [ run test_cpp_rat_serial.cpp ../../serialization/build//boost_serialization : : : release gcc-mingw:static ] ; test-suite misc : [ compile test_constexpr.cpp : [ check-target-builds ../config//has_float128 : HAVE_FLOAT128 : ] [ check-target-builds ../config//has_intel_quad : -Qoption,cpp,--extended_float_type HAVE_FLOAT128 : ] [ requires cxx11_constexpr cxx11_user_defined_literals ] ] [ compile constexpr_test_arithmetic_backend.cpp : [ requires cxx14_constexpr cxx17_if_constexpr ] ] [ compile constexpr_test_float128.cpp : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 : quadmath : no ] ] [ run constexpr_test_cpp_int.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : no ] ] [ run constexpr_test_cpp_int_2.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : no ] ] [ run constexpr_test_cpp_int_3.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : no ] ] [ run constexpr_test_cpp_int_4.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : no ] ] [ run constexpr_test_cpp_int_5.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : no ] ] [ run constexpr_test_cpp_int_6.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : clang:-fconstexpr-steps=268435456 : no ] [ check-target-builds ../config//has_constexpr_limits : -fconstexpr-ops-limit=268435456 ] ] [ run constexpr_test_cpp_int_7.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : clang:-fconstexpr-steps=268435456 : no ] ] [ compile test_nothrow_cpp_int.cpp ] [ compile test_nothrow_cpp_rational.cpp ] [ compile test_nothrow_cpp_bin_float.cpp ] [ compile test_nothrow_cpp_dec_float.cpp ] [ compile test_nothrow_float128.cpp : [ check-target-builds ../config//has_float128 : : no ] ] [ compile test_nothrow_gmp.cpp : [ check-target-builds ../config//has_gmp : : no ] ] [ compile test_nothrow_mpfr.cpp : [ check-target-builds ../config//has_mpfr : : no ] ] [ run test_miller_rabin.cpp no_eh_support gmp : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] release # otherwise [ runtime is too slow!! ] [ run test_rational_io.cpp $(TOMMATH) no_eh_support : # command line : # input files : # requirements TEST_TOMMATH [ check-target-builds ../config//has_tommath : : no ] release # Otherwise [ runtime is slow : test_rational_io_tommath ] [ run test_rational_io.cpp gmp no_eh_support : # command line : # input files : # requirements TEST_MPQ [ check-target-builds ../config//has_gmp : : no ] release # Otherwise [ runtime is slow : test_rational_io_mpz ] [ run test_rational_io.cpp no_eh_support : # command line : # input files : # requirements TEST_CPP_INT release # Otherwise [ runtime is slow : test_rational_io_cpp_int ] [ run test_generic_conv.cpp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : TEST_GMP gmp : ] [ check-target-builds ../config//has_tommath : TEST_TOMMATH $(TOMMATH) : ] [ check-target-builds ../config//has_mpfr : TEST_MPFR mpfr : ] release # Otherwise [ runtime is slow ] [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono : # command line : # input files : # requirements TEST1 release : test_rat_float_interconv_1 ] [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono : # command line : # input files : # requirements TEST2 release : test_rat_float_interconv_2 ] [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono : # command line : # input files : # requirements TEST3 release : test_rat_float_interconv_3 ] [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono : # command line : # input files : # requirements TEST4 release : test_rat_float_interconv_4 ] [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp : # command line : # input files : # requirements TEST5 [ check-target-builds ../config//has_mpfr : : no ] release : test_rat_float_interconv_5 ] [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp : # command line : # input files : # requirements TEST6 [ check-target-builds ../config//has_mpfr : : no ] release : test_rat_float_interconv_6 ] [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp : # command line : # input files : # requirements TEST7 [ check-target-builds ../config//has_mpfr : : no ] release : test_rat_float_interconv_7 ] [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp : # command line : # input files : # requirements TEST8 [ check-target-builds ../config//has_mpfr : : no ] release : test_rat_float_interconv_8 ] [ run test_cpp_int_conv.cpp no_eh_support ] [ run test_cpp_int_import_export.cpp no_eh_support ] [ run test_native_integer.cpp no_eh_support ] [ run test_mixed_cpp_int.cpp no_eh_support ] [ run test_mixed_float.cpp no_eh_support : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : TEST_GMP gmp : ] [ check-target-builds ../config//has_mpfr : TEST_MPFR mpfr gmp : ] ] [ compile include_test/mpfr_include_test.cpp : # requirements [ check-target-builds ../config//has_mpfr : : no ] ] [ compile include_test/gmp_include_test.cpp : # requirements [ check-target-builds ../config//has_gmp : : no ] ] [ compile include_test/tommath_include_test.cpp : # requirements [ check-target-builds ../config//has_tommath : : no ] ] [ compile include_test/cpp_int_include_test.cpp ] [ compile include_test/cpp_dec_float_include_test.cpp ] [ compile include_test/cpp_bin_float_include_test.cpp ] [ run ublas_interop/test1.cpp ublas_interop/test11.cpp ublas_interop/test12.cpp ublas_interop/test13.cpp no_eh_support ] [ run ublas_interop/test2.cpp ublas_interop/test21.cpp ublas_interop/test22.cpp ublas_interop/test23.cpp no_eh_support ] #[ run ublas_interop/test3.cpp ublas_interop/test31.cpp ublas_interop/test32.cpp ublas_interop/test33.cpp ] [ run ublas_interop/test4.cpp ublas_interop/test42.cpp ublas_interop/test43.cpp no_eh_support ] [ run ublas_interop/test5.cpp ublas_interop/test52.cpp ublas_interop/test53.cpp no_eh_support ] [ run ublas_interop/test6.cpp ublas_interop/test62.cpp ublas_interop/test63.cpp no_eh_support ] #[ run ublas_interop/test7.cpp ublas_interop/test71.cpp ublas_interop/test72.cpp ublas_interop/test73.cpp ] [ run ublas_interop/test1.cpp ublas_interop/test11.cpp ublas_interop/test12.cpp ublas_interop/test13.cpp no_eh_support : : : TEST_ET=1 : ublas1_et ] [ run ublas_interop/test2.cpp ublas_interop/test21.cpp ublas_interop/test22.cpp ublas_interop/test23.cpp no_eh_support : : : TEST_ET=1 : ublas2_et ] #[ run ublas_interop/test3.cpp ublas_interop/test31.cpp ublas_interop/test32.cpp ublas_interop/test33.cpp : : : TEST_ET=1 : ublas3_et ] [ run ublas_interop/test4.cpp ublas_interop/test42.cpp ublas_interop/test43.cpp no_eh_support : : : TEST_ET=1 : ublas3_et ] [ run ublas_interop/test5.cpp ublas_interop/test52.cpp ublas_interop/test53.cpp no_eh_support : : : TEST_ET=1 : ublas4_et ] [ run ublas_interop/test6.cpp ublas_interop/test62.cpp ublas_interop/test63.cpp no_eh_support : : : TEST_ET=1 : ublas5_et ] #[ run ublas_interop/test7.cpp ublas_interop/test71.cpp ublas_interop/test72.cpp ublas_interop/test73.cpp : : : TEST_ET=1 : ublas6_et ] # # Serialization tests, run in release mode so we cycle through more values: # [ run test_adapt_serial.cpp ../../serialization/build//boost_serialization : : : release gcc-mingw:static ] [ run test_cpp_dec_float_serial.cpp ../../serialization/build//boost_serialization : : : release TEST1 gcc-mingw:static : test_cpp_dec_float_serial_1 ] [ run test_cpp_dec_float_serial.cpp ../../serialization/build//boost_serialization : : : release TEST2 gcc-mingw:static : test_cpp_dec_float_serial_2 ] [ run test_float128_serial.cpp ../../serialization/build//boost_serialization quadmath : : : release gcc-mingw:static [ check-target-builds ../config//has_float128 : : no ] ] [ run test_cpp_bin_float_serial.cpp ../../serialization/build//boost_serialization : : : release gcc-mingw:static TEST1 : test_bin_dec_float_serial_1 ] [ run test_cpp_bin_float_serial.cpp ../../serialization/build//boost_serialization : : : release TEST2 gcc-mingw:static : test_bin_dec_float_serial_2 ] # # Mixed mode comparison tests, see: https://svn.boost.org/trac/boost/ticket/11328 # [ run test_checked_mixed_cpp_int.cpp no_eh_support ] [ run test_mixed_cpp_bin_float.cpp no_eh_support ] [ run test_mixed_cpp_dec_float.cpp no_eh_support ] [ run test_mixed_mpf_float.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : no ] ] [ run test_mixed_mpfr_float.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : no ] ] # # Check for narrowing conversions: # [ run test_float_conversions.cpp no_eh_support ] # # specific bug cases: # [ compile bug11922.cpp ] [ run bug12039.cpp no_eh_support ] [ compile git_issue_30.cpp ] [ compile git_issue_98.cpp : [ check-target-builds ../config//has_float128 : TEST_FLOAT128 quadmath : ] [ check-target-builds ../config//has_gmp : TEST_GMP gmp : ] [ check-target-builds ../config//has_mpfr : TEST_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpc : TEST_MPC gmp mpfr mpc : ] ] [ run issue_13301.cpp ] [ run issue_13148.cpp ] [ run test_hash.cpp : : : [ check-target-builds ../config//has_float128 : TEST_FLOAT128 quadmath : ] [ check-target-builds ../config//has_gmp : TEST_GMP gmp : ] [ check-target-builds ../config//has_mpfr : TEST_MPFR gmp mpfr : ] [ check-target-builds ../config//has_mpfi : TEST_MPFI gmp mpfr mpfi : ] [ check-target-builds ../config//has_tommath : TEST_TOMMATH tommath : ] ] [ run test_optional_compat.cpp ] # # Eigen interoperability: # [ run test_eigen_interop_cpp_int.cpp : : : release [ check-target-builds ../config//has_eigen : : no ] ] [ run test_eigen_interop_cpp_dec_float.cpp : : : release [ check-target-builds ../config//has_eigen : : no ] ] [ run test_eigen_interop_cpp_dec_float_2.cpp : : : release [ check-target-builds ../config//has_eigen : : no ] ] [ run test_eigen_interop_cpp_dec_float_3.cpp : : : release [ check-target-builds ../config//has_eigen : : no ] ] [ run test_eigen_interop_cpp_bin_float_1.cpp : : : release [ check-target-builds ../config//has_eigen : : no ] ] [ run test_eigen_interop_cpp_bin_float_2.cpp : : : release [ check-target-builds ../config//has_eigen : : no ] ] [ run test_eigen_interop_cpp_bin_float_3.cpp : : : release [ check-target-builds ../config//has_eigen : : no ] ] [ run test_eigen_interop_mpfr_1.cpp mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : no ] [ check-target-builds ../config//has_mpfr : : no ] ] [ run test_eigen_interop_mpfr_2.cpp mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : no ] [ check-target-builds ../config//has_mpfr : : no ] ] [ run test_eigen_interop_mpfr_3.cpp mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : no ] [ check-target-builds ../config//has_mpfr : : no ] ] [ run test_eigen_interop_gmp.cpp gmp : : : release [ check-target-builds ../config//has_eigen : : no ] [ check-target-builds ../config//has_gmp : : no ] ] [ run test_eigen_interop_mpc.cpp mpc mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : no ] [ check-target-builds ../config//has_mpc : : no ] ] ; # # This take too long to run as a regular part of the tests: # run test_cpp_bin_float_round.cpp mpfr gmp ; explicit test_cpp_bin_float_round ; rule get_specfun_tests { local result ; for local source in [ glob math/*.cpp ] { result += [ run $(source) mpfr gmp /boost/test//boost_unit_test_framework/static /boost/regex//boost_regex/static math/instances//test_instances_mpfr/static : # command line : # input files : # requirements [ check-target-builds ../config//has_mpfr : : no ] TEST_MPFR_50 speed BOOST_ALL_NO_LIB BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE msvc:-bigobj ../../math/include_private release : $(source:B)_mpfr ] ; result += [ run $(source) gmp /boost/test//boost_unit_test_framework/static /boost/regex//boost_regex/static math/instances//test_instances_mpf/static : # command line : # input files : # requirements [ check-target-builds ../config//has_gmp : : no ] speed TEST_MPF_50 BOOST_ALL_NO_LIB BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE msvc:-bigobj ../../math/include_private release : $(source:B)_mpf ] ; result += [ run $(source) /boost/test//boost_unit_test_framework/static /boost/regex//boost_regex/static math/instances//test_instances_cpp_dec_float/static : # command line : # input files : # requirements TEST_CPP_DEC_FLOAT BOOST_ALL_NO_LIB BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE speed msvc:-bigobj ../../math/include_private release : $(source:B)_cpp_dec_float ] ; result += [ run $(source) /boost/test//boost_unit_test_framework/static /boost/regex//boost_regex/static math/instances//test_instances_cpp_bin_float/static : # command line : # input files : # requirements TEST_CPP_BIN_FLOAT BOOST_ALL_NO_LIB BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE speed msvc:-bigobj ../../math/include_private release : $(source:B)_cpp_bin_float ] ; result += [ run $(source) quadmath /boost/test//boost_unit_test_framework/static /boost/regex//boost_regex/static math/instances//test_instances_float128/static : # command line : # input files : # requirements [ check-target-builds ../config//has_float128 : : no ] speed TEST_FLOAT128 BOOST_ALL_NO_LIB BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE msvc:-bigobj ../../math/include_private release : $(source:B)_float128 ] ; result += [ run $(source) /boost/test//boost_unit_test_framework/static /boost/regex//boost_regex/static math/instances//test_instances_intel_quad/static : # command line : # input files : # requirements [ check-target-builds ../config//has_intel_quad : -Qoption,cpp,--extended_float_type : no ] [ check-target-builds ../config//has_float128 : quadmath ] speed TEST_FLOAT128 BOOST_ALL_NO_LIB BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE msvc:-bigobj ../../math/include_private release : $(source:B)_intel_quad ] ; } # # High precision tests are rather different, as they test only one # multiprecision type and are more a test of Boost.Math: # for local source in [ glob math/high_prec/*.cpp ] { result += [ run $(source) /boost/test//boost_unit_test_framework/static /boost/regex//boost_regex/static : # command line : # input files : # requirements speed BOOST_ALL_NO_LIB BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE msvc:-bigobj [ check-target-builds ../config//has_mpfr : TEST_MPFR gmp mpfr : ] ../../math/include_private release ] ; } return $(result) ; } test-suite specfun : [ get_specfun_tests ] ; explicit specfun ; rule get_compile_fail_tests { local compile_fail_tests ; for local source in [ glob compile_fail/*.cpp ] { compile_fail_tests += $(source:B) ; compile-fail $(source) : [ check-target-builds ../config//has_gmp : TEST_GMP off : ] [ check-target-builds ../config//has_mpfr : TEST_MPFR off : ] ; } return $(compile_fail_tests) ; } test-suite compile_fail : [ get_compile_fail_tests ] ; rule get_concept_checks { local result ; for local source in [ glob concepts/*.cpp ] { result += [ compile $(source) mpfr : # requirements TEST_MPFR_50 [ check-target-builds ../config//has_mpfr : : no ] off space : $(source:B)_mpfr_50 ] ; result += [ compile $(source) mpfr : # requirements TEST_MPFR_6 [ check-target-builds ../config//has_mpfr : : no ] off space : $(source:B)_mpfr_6 ] ; result += [ compile $(source) mpfr : # requirements TEST_MPFR_15 [ check-target-builds ../config//has_mpfr : : no ] off space : $(source:B)_mpfr_15 ] ; result += [ compile $(source) mpfr : # requirements TEST_MPFR_17 [ check-target-builds ../config//has_mpfr : : no ] off space : $(source:B)_mpfr_17 ] ; result += [ compile $(source) mpfr : # requirements TEST_MPFR_30 [ check-target-builds ../config//has_mpfr : : no ] off space : $(source:B)_mpfr_30 ] ; result += [ compile $(source) gmp : # requirements TEST_MPF_50 [ check-target-builds ../config//has_gmp : : no ] off space : $(source:B)_mpf50 ] ; result += [ compile $(source) : # requirements TEST_CPP_DEC_FLOAT off space : $(source:B)_cpp_dec_float ] ; result += [ compile $(source) : # requirements TEST_CPP_BIN_FLOAT off space : $(source:B)_cpp_bin_float ] ; result += [ compile $(source) : # requirements TEST_CPP_DEC_FLOAT_NO_ET off space : $(source:B)_cpp_dec_float_no_et ] ; result += [ compile $(source) : # requirements TEST_BACKEND off space : $(source:B)_backend_concept ] ; result += [ compile $(source) : # requirements TEST_LOGGED_ADAPTER off space : $(source:B)_logged_adaptor ] ; } return $(result) ; } test-suite concepts : [ get_concept_checks ] ; test-suite examples : ../example//examples ;