]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/chrono/test/traits/duration_values_pass.cpp
1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
9 // Adaptation to Boost of the libcxx
10 // Copyright 2010 Vicente J. Botet Escriba
11 // Distributed under the Boost Software License, Version 1.0.
12 // See http://www.boost.org/LICENSE_1_0.txt
14 #include <boost/chrono/chrono.hpp>
15 #include <boost/type_traits.hpp>
17 #include <boost/detail/lightweight_test.hpp>
23 BOOST_TEST((boost::chrono::duration_values
<int>::min
)() ==
24 (std::numeric_limits
<int>::min
)());
25 BOOST_TEST((boost::chrono::duration_values
<double>::min
)() ==
26 -(std::numeric_limits
<double>::max
)());
27 BOOST_TEST((boost::chrono::duration_values
<Rep
>::min
)() ==
28 (std::numeric_limits
<Rep
>::min
)());
30 BOOST_TEST((boost::chrono::duration_values
<int>::max
)() ==
31 (std::numeric_limits
<int>::max
)());
32 BOOST_TEST((boost::chrono::duration_values
<double>::max
)() ==
33 (std::numeric_limits
<double>::max
)());
34 BOOST_TEST((boost::chrono::duration_values
<Rep
>::max
)() ==
35 (std::numeric_limits
<Rep
>::max
)());
37 BOOST_TEST(boost::chrono::duration_values
<int>::zero() == 0);
38 BOOST_TEST(boost::chrono::duration_values
<Rep
>::zero() == 0);
40 return boost::report_errors();