|
mimic++ v9.2.1
|
Takes the ownership of an expectation and check whether it's satisfied during destruction. More...
#include <Expectation.hpp>
Public Member Functions | |
| ~ScopedExpectation () noexcept(false) | |
| Removes the owned expectation from the ExpectationCollection and checks, whether it's satisfied. | |
| template<typename Signature> | |
| ScopedExpectation (std::shared_ptr< ExpectationCollection< Signature > > collection, std::shared_ptr< typename ExpectationCollection< Signature >::ExpectationT > expectation) noexcept | |
| Constructor, which generates the type-erase storage. | |
| template<typename T> requires requires(util::SourceLocation loc) { { std::declval<T&&>().finalize(loc) } -> std::convertible_to<ScopedExpectation>; } | |
| explicit (false) const expr ScopedExpectation(T &&object | |
| A constructor, which accepts objects, which can be finalized (e.g. ExpectationBuilder). | |
| ScopedExpectation & | operator= (ScopedExpectation const &)=delete |
| Deleted copy-assignment-operator. | |
| ScopedExpectation (ScopedExpectation &&)=default | |
| Defaulted move-constructor. | |
| ScopedExpectation & | operator= (ScopedExpectation &&)=default |
| Defaulted move-assignment-operator. | |
| bool | is_satisfied () const |
| Queries the stored expectation, whether it's satisfied. | |
| bool | is_applicable () const |
| Queries the stored expectation, whether it's applicable. | |
| util::SourceLocation const & | from () const noexcept |
| Queries the stored expectation for it's stored source-location. | |
| StringT const & | mock_name () const noexcept |
| Queries the stored expectation for the name of the related mock. | |
Public Attributes | |
| util::SourceLocation | loc |
Takes the ownership of an expectation and check whether it's satisfied during destruction.
The owned Expectation is type-erased. This comes in handy, when users want to store ScopedExpectations in a single container.
|
inline |
Removes the owned expectation from the ExpectationCollection and checks, whether it's satisfied.
| In | cases of an unsatisfied expectation, the destructor is expected to throw or terminate otherwise. |
|
inlineexplicitnodiscardnoexcept |
Constructor, which generates the type-erase storage.
| Signature | The signature. |
| collection | The expectation collection, the expectation will be attached to. |
| expectation | The expectation. |
|
nodiscarddefault |
Defaulted move-constructor.
|
nodiscard |
A constructor, which accepts objects, which can be finalized (e.g. ExpectationBuilder).
| T | The object type. |
| object | The object to be finalized. |
| loc | The source-location. |
|
inlinenodiscardnoexcept |
Queries the stored expectation for it's stored source-location.
|
inlinenodiscard |
Queries the stored expectation, whether it's applicable.
|
inlinenodiscard |
Queries the stored expectation, whether it's satisfied.
|
inlinenodiscardnoexcept |
Queries the stored expectation for the name of the related mock.
|
default |
Defaulted move-assignment-operator.
|
delete |
Deleted copy-assignment-operator.
| util::SourceLocation mimicpp::ScopedExpectation::loc |