mimic++ v5
|
The base interface for expectations. More...
#include <Expectation.hpp>
Public Types | |
using | CallInfoT = call::info_for_signature_t<Signature> |
The expected call type. | |
using | ReturnT = signature_return_type_t<Signature> |
The return type. | |
Public Member Functions | |
virtual | ~Expectation ()=default |
Defaulted virtual destructor. | |
Expectation ()=default | |
Defaulted default constructor. | |
Expectation (const Expectation &)=delete | |
Deleted copy-constructor. | |
Expectation & | operator= (const Expectation &)=delete |
Deleted copy-assignment-operator. | |
Expectation (Expectation &&)=delete | |
Deleted move-constructor. | |
Expectation & | operator= (Expectation &&)=delete |
Deleted move-assignment-operator. | |
virtual ExpectationReport | report () const =0 |
Creates a report of the internal state. | |
virtual bool | is_satisfied () const noexcept=0 |
Queries all policies, whether they are satisfied. | |
virtual MatchReport | matches (const CallInfoT &call) const =0 |
Queries all policies, whether they accept the given call. | |
virtual void | consume (const CallInfoT &call)=0 |
Informs all policies, that the given call has been accepted. | |
virtual constexpr ReturnT | finalize_call (const CallInfoT &call)=0 |
Requests the given call to be finalized. | |
virtual constexpr const std::source_location & | from () const noexcept=0 |
Returns the source-location, where this expectation has been created. | |
The base interface for expectations.
Signature | The decayed signature. |
using mimicpp::Expectation< Signature >::CallInfoT = call::info_for_signature_t<Signature> |
The expected call type.
using mimicpp::Expectation< Signature >::ReturnT = signature_return_type_t<Signature> |
The return type.
|
virtualdefault |
Defaulted virtual destructor.
|
nodiscarddefault |
Defaulted default constructor.
|
delete |
Deleted copy-constructor.
|
delete |
Deleted move-constructor.
|
pure virtual |
Informs all policies, that the given call has been accepted.
call | The call to be consumed. |
This function is called, when a match has been made.
Implemented in mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >.
|
nodiscardconstexprpure virtual |
Requests the given call to be finalized.
call | The call to be finalized. |
This function is called, when a match has been made and consume
has been called.
Implemented in mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >.
|
nodiscardconstexprpure virtualnoexcept |
Returns the source-location, where this expectation has been created.
Implemented in mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >.
|
nodiscardpure virtualnoexcept |
Queries all policies, whether they are satisfied.
Implemented in mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >.
|
nodiscardpure virtual |
Queries all policies, whether they accept the given call.
call | The call to be matched. |
Implemented in mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >.
|
delete |
Deleted copy-assignment-operator.
|
delete |
Deleted move-assignment-operator.
|
nodiscardpure virtual |
Creates a report of the internal state.
Implemented in mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >.