5#ifndef BITCOIN_TEST_UTIL_COMMON_H
6#define BITCOIN_TEST_UTIL_COMMON_H
22 bool operator()(
const std::exception&
e)
const {
return (*
this)(
e.what()); }
30template <
typename T>
requires std::is_enum_v<T>
37inline std::ostream&
operator<<(std::ostream&
os,
const std::optional<T>& v)
40 :
os <<
"std::nullopt";
47template <HasToString T>
50 return os <<
obj.ToString();
BOOST_CHECK_EXCEPTION predicates to check the specific validation error.
bool operator()(std::string_view s) const
const std::string m_reason
bool operator()(const std::exception &e) const
HasReason(std::string_view reason)
#define T(expected, seed, data)
std::ostream & operator<<(std::ostream &os, const T &e)
std::ostream & operator<<(std::ostream &os, const T &obj)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.