|
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.
|
|
template<typename Signature, control_policy ControlPolicy, finalize_policy_for< Signature > FinalizePolicy, expectation_policy_for< Signature >... Policies>
class mimicpp::BasicExpectation< Signature, ControlPolicy, FinalizePolicy, Policies >
The actual expectation template.
- Template Parameters
-
Signature | The decayed signature. |
ControlPolicy | The applied control-policy. |
FinalizePolicy | The applied finalize-policy. |
Policies | All applied expectation-policies. |
template<typename Signature , control_policy ControlPolicy, finalize_policy_for< Signature > FinalizePolicy, expectation_policy_for< Signature >... Policies>
|
inlineconstexproverridevirtual |
Informs all policies, that the given call has been accepted.
- Parameters
-
call | The call to be consumed. |
This function is called, when a match has been made.
Implements mimicpp::Expectation< Signature >.
template<typename Signature , control_policy ControlPolicy, finalize_policy_for< Signature > FinalizePolicy, expectation_policy_for< Signature >... Policies>
|
inlinenodiscardconstexproverridevirtual |
Requests the given call to be finalized.
- Parameters
-
call | The call to be finalized. |
- Returns
- Returns the call result.
This function is called, when a match has been made and consume
has been called.
Implements mimicpp::Expectation< Signature >.