• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
10 // <chrono>
11 
12 // duration_values::min
13 
14 #include <chrono>
15 #include <limits>
16 #include <cassert>
17 
18 #include "test_macros.h"
19 #include "../../rep.h"
20 
main()21 int main()
22 {
23     assert(std::chrono::duration_values<int>::min() ==
24            std::numeric_limits<int>::lowest());
25     assert(std::chrono::duration_values<double>::min() ==
26            std::numeric_limits<double>::lowest());
27     assert(std::chrono::duration_values<Rep>::min() ==
28            std::numeric_limits<Rep>::lowest());
29 #if TEST_STD_VER >= 11
30     static_assert(std::chrono::duration_values<int>::min() ==
31            std::numeric_limits<int>::lowest(), "");
32     static_assert(std::chrono::duration_values<double>::min() ==
33            std::numeric_limits<double>::lowest(), "");
34     static_assert(std::chrono::duration_values<Rep>::min() ==
35            std::numeric_limits<Rep>::lowest(), "");
36 #endif
37 }
38