1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
8 // UNSUPPORTED: c++03, c++11
13 #include "test_macros.h"
17 using namespace std::chrono
;
20 assert ( h
== hours(4));
25 assert ( min
== minutes(36));
27 assert ( min
== min2
);
30 assert ( s
== seconds(24));
34 milliseconds ms
= 247ms
;
35 assert ( ms
== milliseconds(247));
39 microseconds us
= 867us
;
40 assert ( us
== microseconds(867));
44 nanoseconds ns
= 645ns
;
45 assert ( ns
== nanoseconds(645));
50 assert(Sunday
== weekday(0));
51 assert(Monday
== weekday(1));
52 assert(Tuesday
== weekday(2));
53 assert(Wednesday
== weekday(3));
54 assert(Thursday
== weekday(4));
55 assert(Friday
== weekday(5));
56 assert(Saturday
== weekday(6));
58 assert(January
== month(1));
59 assert(February
== month(2));
60 assert(March
== month(3));
61 assert(April
== month(4));
62 assert(May
== month(5));
63 assert(June
== month(6));
64 assert(July
== month(7));
65 assert(August
== month(8));
66 assert(September
== month(9));
67 assert(October
== month(10));
68 assert(November
== month(11));
69 assert(December
== month(12));