histogram/test/detail_limits_test.cpp
Hans Dembinski df647cf959
update copyright (#55)
* add missing copyright notices
* workaround for xml_iarchive bug to handle XML with comments
* fixing min/max according to boost guidelines
2019-08-19 16:53:27 +02:00

25 lines
838 B
C++

// Copyright 2015-2017 Hans Dembinski
//
// Distributed under 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)
#include <boost/core/lightweight_test.hpp>
#include <boost/histogram/detail/limits.hpp>
#include <limits>
using namespace boost::histogram::detail;
int main() {
BOOST_TEST_EQ(lowest<int>(), (std::numeric_limits<int>::min)());
BOOST_TEST_EQ(lowest<float>(), -std::numeric_limits<float>::infinity());
BOOST_TEST_EQ(lowest<double>(), -std::numeric_limits<double>::infinity());
BOOST_TEST_EQ(highest<int>(), (std::numeric_limits<int>::max)());
BOOST_TEST_EQ(highest<float>(), std::numeric_limits<float>::infinity());
BOOST_TEST_EQ(highest<double>(), std::numeric_limits<double>::infinity());
return boost::report_errors();
}