mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Add compile tests for F32 and F64
This commit is contained in:
@@ -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" : <linkflags>-lquadmath ] ]
|
||||
|
||||
32
test/compile_test/float32.cpp
Normal file
32
test/compile_test/float32.cpp
Normal file
@@ -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(<stdfloat>)
|
||||
# include <stdfloat>
|
||||
#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
|
||||
32
test/compile_test/float64.cpp
Normal file
32
test/compile_test/float64.cpp
Normal file
@@ -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(<stdfloat>)
|
||||
# include <stdfloat>
|
||||
#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
|
||||
@@ -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<RealType>(0.5));
|
||||
auto v2(static_cast<RealType>(0.5));
|
||||
auto v3(static_cast<RealType>(0.5));
|
||||
boost::detail::dummy_constructor dc;
|
||||
boost::output_iterator_archetype<RealType> oi(dc);
|
||||
#ifdef TEST_GROUP_4
|
||||
|
||||
Reference in New Issue
Block a user