[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / time / time.duration / time.duration.literals / literals2.pass.cpp
blob8244f666afb4a46bd24eb395f51f87f95d63add9
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11
10 // <chrono>
12 #include <chrono>
13 #include <type_traits>
14 #include <cassert>
16 #include "test_macros.h"
18 int main(int, char**)
20 using namespace std::literals;
22 std::chrono::hours h = 4h;
23 assert ( h == std::chrono::hours(4));
24 auto h2 = 4.0h;
25 assert ( h == h2 );
27 std::chrono::minutes min = 36min;
28 assert ( min == std::chrono::minutes(36));
29 auto min2 = 36.0min;
30 assert ( min == min2 );
32 std::chrono::seconds s = 24s;
33 assert ( s == std::chrono::seconds(24));
34 auto s2 = 24.0s;
35 assert ( s == s2 );
37 std::chrono::milliseconds ms = 247ms;
38 assert ( ms == std::chrono::milliseconds(247));
39 auto ms2 = 247.0ms;
40 assert ( ms == ms2 );
42 std::chrono::microseconds us = 867us;
43 assert ( us == std::chrono::microseconds(867));
44 auto us2 = 867.0us;
45 assert ( us == us2 );
47 std::chrono::nanoseconds ns = 645ns;
48 assert ( ns == std::chrono::nanoseconds(645));
49 auto ns2 = 645.ns;
50 assert ( ns == ns2 );
52 return 0;