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, c++14, c++17
11 // class weekday_last;
13 // constexpr bool operator==(const weekday& x, const weekday& y) noexcept;
14 // constexpr bool operator!=(const weekday& x, const weekday& y) noexcept;
18 #include <type_traits>
21 #include "test_macros.h"
22 #include "test_comparisons.h"
26 using weekday
= std::chrono::weekday
;
27 using weekday_last
= std::chrono::weekday_last
;
29 AssertEqualityAreNoexcept
<weekday_last
>();
30 AssertEqualityReturnBool
<weekday_last
>();
32 static_assert(testEqualityValues
<weekday_last
>(weekday
{0}, weekday
{0}), "");
33 static_assert(testEqualityValues
<weekday_last
>(weekday
{0}, weekday
{1}), "");
35 // Some 'ok' values as well
36 static_assert(testEqualityValues
<weekday_last
>(weekday
{2}, weekday
{2}), "");
37 static_assert(testEqualityValues
<weekday_last
>(weekday
{2}, weekday
{3}), "");
39 for (unsigned i
= 0; i
< 6; ++i
)
40 for (unsigned j
= 0; j
< 6; ++j
)
41 assert(testEqualityValues
<weekday_last
>(weekday
{i
}, weekday
{j
}));