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
9// UNSUPPORTED: c++03, c++11, c++14, c++17
10// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
11
12// XFAIL: libcpp-has-no-experimental-tzdb
13// XFAIL: availability-tzdb-missing
14
15// <chrono>
16
17// const tzdb& get_tzdb_list();
18
19#include <chrono>
20
21#include <iterator>
22#include <cassert>
23
24#include "test_macros.h"
25
26int main(int, const char**) {
27 const std::chrono::tzdb_list& list = std::chrono::get_tzdb_list();
28
29 assert(!list.front().version.empty());
30 assert(std::distance(list.begin(), list.end()) == 1);
31 assert(std::distance(list.cbegin(), list.cend()) == 1);
32
33 return 0;
34}
35

source code of libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb_list.pass.cpp