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>
31inline std::ostream&
operator<<(std::ostream& os,
const T& e)
33 return os << static_cast<std::underlying_type_t<T>>(e);
37inline std::ostream&
operator<<(std::ostream& os,
const std::optional<T>& v)
40 : os <<
"std::nullopt";
47template <HasToString T>
48inline std::ostream&
operator<<(std::ostream& os,
const T& obj)
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)