|
mimic++ v9.2.1
|
A reporter, which creates text messages and reports them via the provided callbacks. More...
#include <BasicReporter.hpp>
Public Member Functions | |
| void | report_no_matches (CallReport call, std::vector< NoMatchReport > noMatchReports) override |
| Expects reports on all non-matching expectations. This is only called when no better options are available. | |
| void | report_inapplicable_matches (CallReport call, std::vector< ExpectationReport > expectationReports) override |
| Handles reports for all inapplicable but otherwise matching expectations. This function is called only when no better options are available. | |
| void | report_full_match (CallReport call, ExpectationReport expectationReport) noexcept override |
| Handles the report for a fully matching expectation. | |
| void | report_unfulfilled_expectation (const ExpectationReport expectationReport) override |
| Handles the report of an unfulfilled expectation. | |
| void | report_error (StringT const message) override |
| Handles general or unspecified errors. | |
| void | report_unhandled_exception (CallReport const call, ExpectationReport const expectationReport, std::exception_ptr const exception) override |
Handles reports about unhandled exceptions during handle_call. | |
A reporter, which creates text messages and reports them via the provided callbacks.
| successReporter | The success reporter callback. |
| warningReporter | The warning reporter callback. |
| failReporter | The fail reporter callback. This reporter must never return! |
|
inlineoverridevirtual |
Handles general or unspecified errors.
| message | The error message. |
This function is called when a non-specific error occurs.
std::uncaught_exceptions(). DefaultReporter::report_error for an example. Implements mimicpp::reporting::IReporter.
|
inlineoverridevirtualnoexcept |
Handles the report for a fully matching expectation.
| call | The call report. |
| expectationReport | Report of the fully matched expectation. |
This function is called when a match has been found. There are no other expectations for the behavior of this function, except for the noexcept guarantee. Implementations should simply return to the caller.
Implements mimicpp::reporting::IReporter.
|
inlineoverridevirtual |
Handles reports for all inapplicable but otherwise matching expectations. This function is called only when no better options are available.
| call | The call report. |
| expectationReports | Reports of all inapplicable expectations. |
This function is called when no applicable match has been found, but the call expectations are actually fulfilled. This occurs when the "times" policy is already saturated (e.g., it was expected once and has already been matched once) or is otherwise not applicable (e.g., a sequence element is not the current element).
std::abort). Failing to do so will result in undefined behavior. Implements mimicpp::reporting::IReporter.
|
inlineoverridevirtual |
Expects reports on all non-matching expectations. This is only called when no better options are available.
| call | The call report. |
| noMatchReports | Reports of all none matching expectations. |
This function is called when no match has been found and there are no other expectations that are matching but inapplicable. It serves as the fallback reporting mechanism for unmatched calls.
noMatchReports may be empty.std::abort). Failing to do so will result in undefined behavior. Implements mimicpp::reporting::IReporter.
|
inlineoverridevirtual |
Handles the report of an unfulfilled expectation.
| expectationReport | The expectation report. |
This function is called when an unfulfilled expectation goes out of scope. This occurs when the "times" policy is not satisfied.
std::uncaught_exceptions) before throwing their own exception. DefaultReporter::report_unfulfilled_expectation for an example. Implements mimicpp::reporting::IReporter.
|
inlineoverridevirtual |
Handles 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 an exception during a matches call. There are no specific requirements for the behavior of this function. Since this function is called inside a catch-block, throwing exceptions will result in a terminate call.
Implements mimicpp::reporting::IReporter.