[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / time / time.zone / time.zone.db / time.zone.db.list / iterators.pass.cpp
blob7fec4cf8556b54aa6e0a37560df1ac96a4eaa4f4
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, c++14, c++17
10 // UNSUPPORTED: no-filesystem, no-localization, no-tzdb
12 // XFAIL: libcpp-has-no-incomplete-tzdb
13 // XFAIL: availability-tzdb-missing
15 // TODO TZDB Enable tests
16 // UNSUPPORTED: c++20, c++23, c++26
18 // <chrono>
20 // class tzdb_list;
22 // const_iterator begin() const noexcept;
23 // const_iterator end() const noexcept;
25 // const_iterator cbegin() const noexcept;
26 // const_iterator cend() const noexcept;
28 #include <chrono>
29 #include <iterator>
30 #include <cassert>
32 int main(int, char**) {
33 const std::chrono::tzdb_list& list = std::chrono::get_tzdb_list();
34 using it = std::chrono::tzdb_list::const_iterator;
36 static_assert(noexcept(list.begin()));
37 static_assert(noexcept(list.end()));
38 static_assert(noexcept(list.cbegin()));
39 static_assert(noexcept(list.cend()));
41 std::same_as<it> auto begin = list.begin();
42 std::same_as<it> auto end = list.end();
43 assert(std::distance(begin, end) == 1);
45 std::same_as<it> auto cbegin = list.cbegin();
46 assert(begin == cbegin);
48 std::same_as<it> auto cend = list.cend();
49 assert(end == cend);
51 return 0;