mimic++ v6
|
The reporter interface. More...
#include <Reporter.hpp>
Public Member Functions | |
virtual | ~IReporter ()=default |
Defaulted virtual destructor. | |
virtual void | report_no_matches (CallReport call, std::vector< MatchReport > matchReports)=0 |
Expects reports about all none matching expectations. This is only called, if there are no better options available. | |
virtual void | report_inapplicable_matches (CallReport call, std::vector< MatchReport > matchReports)=0 |
Expects reports about all inapplicable matching expectations. This is only called, if there are no better options available. | |
virtual void | report_full_match (CallReport call, MatchReport matchReport) noexcept=0 |
Expects the report about a full matching expectation. | |
virtual void | report_unfulfilled_expectation (ExpectationReport expectationReport)=0 |
Expects the report of an unfulfilled expectation. | |
virtual void | report_error (StringT message)=0 |
Expects rather unspecific errors. | |
virtual void | report_unhandled_exception (CallReport call, ExpectationReport expectationReport, std::exception_ptr exception)=0 |
Expects reports about unhandled exceptions, during handle_call . | |
Protected Member Functions | |
IReporter ()=default | |
IReporter (const IReporter &)=default | |
IReporter & | operator= (const IReporter &)=default |
IReporter (IReporter &&)=default | |
IReporter & | operator= (IReporter &&)=default |
The reporter interface.
This is the central interface to be used, when creating reporters for external domains.
|
virtualdefault |
Defaulted virtual destructor.
|
nodiscardprotecteddefault |
|
protecteddefault |
|
protecteddefault |
|
pure virtual |
Expects rather unspecific errors.
message | The error message. |
This function is called, when an unspecific error occurs.
std::uncaught_exceptions
) before throwing by themselves. DefaultReporter::report_error
for an example. Implemented in mimicpp::BasicReporter< successReporter, warningReporter, failReporter >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, and mimicpp::DefaultReporter.
|
pure virtualnoexcept |
Expects the report about a full
matching expectation.
call | The call report. |
matchReport | Report of the full matching expectation. |
This function is called, when a match has been found. There are no other expectations on the behavior of this function; except the noexcept
guarantee. Implementations shall simply return to the caller.
Implemented in mimicpp::BasicReporter< successReporter, warningReporter, failReporter >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, and mimicpp::DefaultReporter.
|
pure virtual |
Expects reports about all inapplicable
matching expectations. This is only called, if there are no better options available.
call | The call report. |
matchReports | Reports of all inapplicable matching expectations. |
This function is called, when no applicable match has been found, but actually the call expectations are fulfilled. This in fact happens, when the times
policy is already saturated (e.g. it was once expected and already matched once) or otherwise not applicable (e.g. a sequence element is not the current element).
std::terminate
). Otherwise, this will result in undefined behavior. Implemented in mimicpp::BasicReporter< successReporter, warningReporter, failReporter >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, and mimicpp::DefaultReporter.
|
pure virtual |
Expects reports about all none
matching expectations. This is only called, if there are no better options available.
call | The call report. |
matchReports | Reports of all none matching expectations. |
This function is called, when no match has been found and there are no other expectations, which are matching but inapplicable. In fact, this is the fallback reporting mechanism, for unmatched calls.
matchReports
may be empty.std::terminate
). Otherwise, this will result in undefined behavior. Implemented in mimicpp::BasicReporter< successReporter, warningReporter, failReporter >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, and mimicpp::DefaultReporter.
|
pure virtual |
Expects the report of an unfulfilled expectation.
expectationReport | The expectation report. |
This function is called, when an unfulfilled expectation goes out of scope. In fact this happens, when the times
policy is not satisfied.
std::uncaught_exceptions
) before throwing by themselves. DefaultReporter::report_unfulfilled_expectation
for an example. Implemented in mimicpp::BasicReporter< successReporter, warningReporter, failReporter >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, and mimicpp::DefaultReporter.
|
pure virtual |
Expects reports about unhandled exceptions, during handle_call
.
call | The call report. |
expectationReport | The expectation report. |
exception | The exception. |
This function is called, when an expectation throws during a matches
call. There are no expectations on the behavior of this function. As this function is called inside a catch
block, throwing exceptions will result in a terminate call.
Implemented in mimicpp::BasicReporter< successReporter, warningReporter, failReporter >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::boost_test::send_success, &detail::boost_test::send_warning, &detail::boost_test::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::catch2::send_success, &detail::catch2::send_warning, &detail::catch2::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::doctest::send_success, &detail::doctest::send_warning, &detail::doctest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, mimicpp::BasicReporter< &detail::gtest::send_success, &detail::gtest::send_warning, &detail::gtest::send_fail >, and mimicpp::DefaultReporter.