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 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11
13 #include <type_traits>
16 #include "test_macros.h"
20 using namespace std::literals
;
22 std::chrono::hours h
= 4h
;
23 assert ( h
== std::chrono::hours(4));
27 std::chrono::minutes min
= 36min
;
28 assert ( min
== std::chrono::minutes(36));
30 assert ( min
== min2
);
32 std::chrono::seconds s
= 24s
;
33 assert ( s
== std::chrono::seconds(24));
37 std::chrono::milliseconds ms
= 247ms
;
38 assert ( ms
== std::chrono::milliseconds(247));
42 std::chrono::microseconds us
= 867us
;
43 assert ( us
== std::chrono::microseconds(867));
47 std::chrono::nanoseconds ns
= 645ns
;
48 assert ( ns
== std::chrono::nanoseconds(645));