The actual expectation template. More...
#include <Expectation.hpp>
Public Types | |
using | ControlPolicyT = ControlPolicy |
using | FinalizerT = FinalizePolicy |
using | PolicyListT = std::tuple<Policies...> |
using | CallInfoT = call::info_for_signature_t<Signature> |
using | ReturnT = typename Expectation<Signature>::ReturnT |
Public Member Functions | |
template<typename ControlPolicyArg, typename FinalizerArg, typename... PolicyArgs> requires std::constructible_from<ControlPolicyT, ControlPolicyArg> && std::constructible_from<FinalizerT, FinalizerArg> && std::constructible_from<PolicyListT, PolicyArgs...> | |
constexpr | BasicExpectation (const std::source_location &sourceLocation, ControlPolicyArg &&controlArg, FinalizerArg &&finalizerArg, PolicyArgs &&... args) noexcept(std::is_nothrow_constructible_v< ControlPolicyT, ControlPolicyArg > &&std::is_nothrow_constructible_v< FinalizerT, FinalizerArg > &&(std::is_nothrow_constructible_v< Policies, PolicyArgs > &&...)) |
Constructs the expectation with the given arguments. | |
ExpectationReport | report () const override |
Creates a report of the internal state. | |
constexpr bool | is_satisfied () const noexcept override |
Queries all policies, whether they are satisfied. | |
MatchReport | matches (const CallInfoT &call) const override |
Queries all policies, whether they accept the given call. | |
constexpr void | consume (const CallInfoT &call) override |
Informs all policies, that the given call has been accepted. | |
constexpr ReturnT | finalize_call (const CallInfoT &call) override |
Requests the given call to be finalized. | |
constexpr const std::source_location & | from () const noexcept override |
Returns the source-location, where this expectation has been created. | |
The actual expectation template.
Signature | The decayed signature. |
ControlPolicy | The applied control-policy. |
FinalizePolicy | The applied finalize-policy. |
Policies | All applied expectation-policies. |
using mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >::CallInfoT = call::info_for_signature_t<Signature> |
using mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >::ControlPolicyT = ControlPolicy |
using mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >::FinalizerT = FinalizePolicy |
using mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >::PolicyListT = std::tuple<Policies...> |
using mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >::ReturnT = typename Expectation<Signature>::ReturnT |
|
inlineexplicitconstexprnoexcept |
Constructs the expectation with the given arguments.
ControlPolicyArg | The control-policy constructor argument types. |
FinalizerArg | The finalize-policy constructor argument types. |
PolicyArgs | The expectation-policies constructor argument types. |
sourceLocation | The source-location, where the construction has been requested from. |
controlArg | The control-policy constructor argument. |
finalizerArg | The finalize-policy constructor argument. |
args | The expectation-policies constructor arguments. |
|
inlineconstexproverridevirtual |
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.
Implements mimicpp::Expectation< Signature >.
|
inlinenodiscardconstexproverridevirtual |
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.
Implements mimicpp::Expectation< Signature >.
|
inlinenodiscardconstexproverridevirtualnoexcept |
Returns the source-location, where this expectation has been created.
Implements mimicpp::Expectation< Signature >.
|
inlinenodiscardconstexproverridevirtualnoexcept |
Queries all policies, whether they are satisfied.
Implements mimicpp::Expectation< Signature >.
|
inlinenodiscardoverridevirtual |
Queries all policies, whether they accept the given call.
call | The call to be matched. |
Implements mimicpp::Expectation< Signature >.
|
inlinenodiscardoverridevirtual |
Creates a report of the internal state.
Implements mimicpp::Expectation< Signature >.