mirror of
https://github.com/boostorg/functional.git
synced 2025-08-02 14:04:27 +02:00
Fix clumsy mistakes in the epsilon hash test.
[SVN r31908]
This commit is contained in:
@@ -137,13 +137,13 @@ void float_tests(char const* name, T* = 0)
|
|||||||
BOOST_CHECK(x1(std::numeric_limits<T>::epsilon()) ==
|
BOOST_CHECK(x1(std::numeric_limits<T>::epsilon()) ==
|
||||||
HASH_NAMESPACE::hash_value(std::numeric_limits<T>::epsilon()));
|
HASH_NAMESPACE::hash_value(std::numeric_limits<T>::epsilon()));
|
||||||
|
|
||||||
BOOST_CHECK(x1(std::numeric_limits<T>::epsilon()) != x1((T) 0));
|
BOOST_CHECK(std::numeric_limits<T>::epsilon() != (T) 0);
|
||||||
if(x1(std::numeric_limits<T>::epsilon()) == x1((T) 0))
|
if(x1(std::numeric_limits<T>::epsilon()) == x1((T) 0))
|
||||||
std::cout<<"x1(epsilon) == x1(0) == "<<x1(std::numeric_limits<T>::epsilon())<<"\n";
|
std::cout<<"x1(epsilon) == x1(0) == "<<x1((T) 0)<<"\n";
|
||||||
|
|
||||||
BOOST_CHECK(x1(std::numeric_limits<T>::epsilon()) != x1((T) 1));
|
BOOST_CHECK(std::numeric_limits<T>::epsilon() + (T) 1 != (T) 1);
|
||||||
if(x1(std::numeric_limits<T>::epsilon()) == x1((T)1))
|
if(x1(std::numeric_limits<T>::epsilon() + (T) 1) == x1((T) 1))
|
||||||
std::cout<<"x1(epsilon) == x1(1) == "<<x1(std::numeric_limits<T>::epsilon())<<"\n";
|
std::cout<<"x1(epsilon + 1) == x1(1) == "<<x1((T) 1)<<"\n";
|
||||||
|
|
||||||
// As before.
|
// As before.
|
||||||
if(std::numeric_limits<T>::has_denorm) {
|
if(std::numeric_limits<T>::has_denorm) {
|
||||||
|
Reference in New Issue
Block a user