diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 48c3ff21e..051e33224 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -902,6 +902,11 @@ test-suite distribution_tests : [ run scipy_issue_18302.cpp ../../test/build//boost_unit_test_framework ] ; +test-suite new_floats : + [ compile compile_test/float32.cpp ] + [ compile compile_test/float64.cpp ] +; + test-suite mp : [ run test_nc_t_quad.cpp pch ../../test/build//boost_unit_test_framework : : : release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] diff --git a/test/compile_test/float32.cpp b/test/compile_test/float32.cpp new file mode 100644 index 000000000..a757b0bb4 --- /dev/null +++ b/test/compile_test/float32.cpp @@ -0,0 +1,32 @@ +// Copyright Matt Borland 2023. +// Use, modification and distribution are subject to 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) + +#if __has_include() +# include +#endif + +#ifdef __STDCPP_FLOAT32_T__ + +#define TEST_COMPLEX + +#include "instantiate.hpp" + +int main(int argc, char* []) +{ + if(argc > 10000) + { + instantiate(0.0F32); + instantiate_mixed(0.0F32); + } +} + +#else + +int main(int, char*[]) +{ + return 0; +} + +#endif diff --git a/test/compile_test/float64.cpp b/test/compile_test/float64.cpp new file mode 100644 index 000000000..a989b9335 --- /dev/null +++ b/test/compile_test/float64.cpp @@ -0,0 +1,32 @@ +// Copyright Matt Borland 2023. +// Use, modification and distribution are subject to 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) + +#if __has_include() +# include +#endif + +#ifdef __STDCPP_FLOAT64_T__ + +#define TEST_COMPLEX + +#include "instantiate.hpp" + +int main(int argc, char* []) +{ + if(argc > 10000) + { + instantiate(0.0F64); + instantiate_mixed(0.0F64); + } +} + +#else + +int main(int, char*[]) +{ + return 0; +} + +#endif diff --git a/test/compile_test/instantiate.hpp b/test/compile_test/instantiate.hpp index 024e79c5d..33939a25a 100644 --- a/test/compile_test/instantiate.hpp +++ b/test/compile_test/instantiate.hpp @@ -181,7 +181,9 @@ void instantiate(RealType) int i = 1; // Deal with unused variable warnings: (void)i; - RealType v1(0.5), v2(0.5), v3(0.5); + auto v1(static_cast(0.5)); + auto v2(static_cast(0.5)); + auto v3(static_cast(0.5)); boost::detail::dummy_constructor dc; boost::output_iterator_archetype oi(dc); #ifdef TEST_GROUP_4