37 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++14, c++1710// UNSUPPORTED: no-filesystem, no-localization, no-tzdb11 12// XFAIL: libcpp-has-no-experimental-tzdb13// XFAIL: availability-tzdb-missing14 15// <chrono>16 17// bool operator==(const time_zone& x, const time_zone& y) noexcept;18// strong_ordering operator<=>(const time_zone& x, const time_zone& y) noexcept;19 20#include <chrono>21#include <cassert>22 23#include "test_macros.h"24#include "test_comparisons.h"25 26int main(int, const char**) {27 const std::chrono::tzdb& tzdb = std::chrono::get_tzdb();28 assert(tzdb.zones.size() > 2);29 30 AssertOrderAreNoexcept<std::chrono::time_zone>();31 AssertOrderReturn<std::strong_ordering, std::chrono::time_zone>();32 33 assert(testOrder(tzdb.zones[0], tzdb.zones[1], std::strong_ordering::less));34 35 return 0;36}37