6#ifndef MIMICPP_ADAPTERS_CATCH2_HPP
7#define MIMICPP_ADAPTERS_CATCH2_HPP
15#if __has_include(<catch2/catch_test_macros.hpp>)
16 #include <catch2/catch_test_macros.hpp>
18 #error "Unable to find catch2 includes."
21namespace mimicpp::detail::catch2
26#ifdef CATCH_CONFIG_PREFIX_ALL
37#ifdef CATCH_CONFIG_PREFIX_ALL
46#ifdef CATCH_CONFIG_PREFIX_MESSAGES
73 &detail::catch2::send_success,
74 &detail::catch2::send_warning,
75 &detail::catch2::send_fail>;
80namespace mimicpp::detail::catch2
83 inline const ReporterInstaller<Catch2ReporterT> installer{};
86#ifdef MIMICPP_CONFIG_EXPERIMENTAL_CATCH2_MATCHER_INTEGRATION
88 #include <catch2/matchers/catch_matchers_templated.hpp>
90template <
typename Matcher>
91 requires std::derived_from<Matcher, Catch::Matchers::MatcherGenericBase>
92 || std::derived_from<Matcher, Catch::Matchers::MatcherUntypedBase>
97 static constexpr bool matches(
const Matcher& matcher, T& value)
98 requires requires { { matcher.match(value) } -> std::convertible_to<bool>; }
100 return matcher.match(value);
A reporter, which creates text messages and reports them via the provided callbacks.
Definition Reporter.hpp:356
BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail > Catch2ReporterT
Reporter for the integration into Catch2.
Definition Catch2.hpp:72
Definition BoostTest.hpp:20
void unreachable()
Invokes undefined behavior.
Definition Utility.hpp:91
std::basic_string_view< CharT, CharTraitsT > StringViewT
Definition Fwd.hpp:345