================ @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++03, c++11, c++14, c++17 + +// XFAIL: libcpp-has-no-experimental-tzdb +// XFAIL: availability-tzdb-missing + +// <chrono> + +// class nonexistent_local_time : public runtime_error { +// public: +// template<class Duration> +// nonexistent_local_time(const local_time<Duration>& tp, const local_info& i); +// }; + +#include <chrono> +#include <stdexcept> +#include <type_traits> + +// Basic properties +static_assert(std::is_base_of_v<std::runtime_error, std::chrono::nonexistent_local_time>); +static_assert(!std::is_default_constructible_v<std::chrono::nonexistent_local_time>); +static_assert(std::is_destructible_v<std::chrono::nonexistent_local_time>); +static_assert(std::is_copy_constructible_v<std::chrono::nonexistent_local_time>); +static_assert(std::is_move_constructible_v<std::chrono::nonexistent_local_time>); +static_assert(std::is_copy_assignable_v<std::chrono::nonexistent_local_time>); +static_assert(std::is_move_assignable_v<std::chrono::nonexistent_local_time>); ---------------- ldionne wrote:
Instead of just asserting those traits, you should have actual runtime tests that exercise these functions. For example if we declared the copy constructor as non-inline in the headers and never defined it in the dylib, this test would pass but we'd want it to fail. https://github.com/llvm/llvm-project/pull/90394 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits