| 1 | // Copyright 2015-2017 Hans Dembinski |
|---|---|
| 2 | // |
| 3 | // Distributed under the Boost Software License, Version 1.0. |
| 4 | // (See accompanying file LICENSE_1_0.txt |
| 5 | // or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | |
| 7 | #include <boost/core/lightweight_test.hpp> |
| 8 | #include <boost/histogram/detail/limits.hpp> |
| 9 | #include <limits> |
| 10 | |
| 11 | using namespace boost::histogram::detail; |
| 12 | |
| 13 | int main() { |
| 14 | |
| 15 | BOOST_TEST_EQ(lowest<int>(), (std::numeric_limits<int>::min)()); |
| 16 | BOOST_TEST_EQ(lowest<float>(), -std::numeric_limits<float>::infinity()); |
| 17 | BOOST_TEST_EQ(lowest<double>(), -std::numeric_limits<double>::infinity()); |
| 18 | |
| 19 | BOOST_TEST_EQ(highest<int>(), (std::numeric_limits<int>::max)()); |
| 20 | BOOST_TEST_EQ(highest<float>(), std::numeric_limits<float>::infinity()); |
| 21 | BOOST_TEST_EQ(highest<double>(), std::numeric_limits<double>::infinity()); |
| 22 | |
| 23 | return boost::report_errors(); |
| 24 | } |
| 25 |
