]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/chrono/test/traits/duration_values_pass.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / chrono / test / traits / duration_values_pass.cpp
1 //===----------------------------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
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
13
14 #include <boost/chrono/chrono.hpp>
15 #include <boost/type_traits.hpp>
16 #include <limits>
17 #include <boost/detail/lightweight_test.hpp>
18
19 #include "../rep.h"
20
21 int main()
22 {
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)());
29
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)());
36
37 BOOST_TEST(boost::chrono::duration_values<int>::zero() == 0);
38 BOOST_TEST(boost::chrono::duration_values<Rep>::zero() == 0);
39
40 return boost::report_errors();
41 }