static void apply() {
quantity<unit_type, T> q((std::numeric_limits<quantity<unit_type, T> >::quiet_NaN)());
bool test = isnan BOOST_PREVENT_MACRO_SUBSTITUTION (q);
- BOOST_CHECK(test);
+ BOOST_TEST(test);
}
};
static void apply() {
quantity<unit_type, T> q((std::numeric_limits<quantity<unit_type, T> >::signaling_NaN)());
bool test = isnan BOOST_PREVENT_MACRO_SUBSTITUTION (q);
- BOOST_CHECK(test);
+ BOOST_TEST(test);
}
};
template<class T>
void do_check() {
- #define CHECK_FUNCTION(name) BOOST_CHECK(((std::numeric_limits<T>::name)() == (std::numeric_limits<quantity<unit_type, T> >::name)().value()))
- #define CHECK_CONSTANT(name) BOOST_CHECK((std::numeric_limits<T>::name == std::numeric_limits<quantity<unit_type, T> >::name))
+ #define CHECK_FUNCTION(name) BOOST_TEST(((std::numeric_limits<T>::name)() == (std::numeric_limits<quantity<unit_type, T> >::name)().value()))
+ #define CHECK_CONSTANT(name) BOOST_TEST((std::numeric_limits<T>::name == std::numeric_limits<quantity<unit_type, T> >::name))
CHECK_FUNCTION(min);
CHECK_FUNCTION(max);
CHECK_FUNCTION(epsilon);
check_signaling_NaN<std::numeric_limits<quantity<unit_type, T> >::has_signaling_NaN>::template apply<T>();
}
-int test_main(int,char *[])
+int main()
{
do_check<float>();
do_check<double>();
do_check<unsigned>();
do_check<std::complex<double> >();
- return(0);
+ return boost::report_errors();
}