[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / time / time.cal / time.cal.mdlast / comparisons.pass.cpp
blob803d2021aac3d87172fe26910687c634b7daa796
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 //===----------------------------------------------------------------------===//
8 // UNSUPPORTED: c++03, c++11, c++14, c++17
10 // <chrono>
11 // class month_day_last;
13 // constexpr bool operator==(const month_day& x, const month_day& y) noexcept;
14 // Returns: x.month() == y.month()
16 // constexpr bool operator< (const month_day& x, const month_day& y) noexcept;
17 // Returns: x.month() < y.month()
20 #include <chrono>
21 #include <type_traits>
22 #include <cassert>
24 #include "test_macros.h"
25 #include "test_comparisons.h"
27 int main(int, char**)
29 using month = std::chrono::month;
30 using month_day_last = std::chrono::month_day_last;
32 AssertComparisonsAreNoexcept<month_day_last>();
33 AssertComparisonsReturnBool<month_day_last>();
35 static_assert( testComparisonsValues<month_day_last>(month{1}, month{1}), "");
36 static_assert( testComparisonsValues<month_day_last>(month{1}, month{2}), "");
38 // same day, different months
39 for (unsigned i = 1; i <= 12; ++i)
40 for (unsigned j = 1; j <= 12; ++j)
41 assert(testComparisonsValues<month_day_last>(month{i}, month{j}));
43 return 0;