34 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// const string remote_version();18 19#include <chrono>20#include <cassert>21#include <string>22 23#include "test_macros.h"24 25int main(int, const char**) {26 std::string version = std::chrono::remote_version();27 assert(!version.empty());28 29 assert(version == std::chrono::get_tzdb().version);30 assert(version == std::chrono::get_tzdb_list().front().version);31 32 return 0;33}34