|
mimic++ v9.2.1
|
A sequence type that verifies its owned expectations during destruction. More...
#include <ScopedSequence.hpp>
Public Member Functions | |
| BasicScopedSequence (BasicScopedSequence const &)=delete | |
| Deleted copy-constructor. | |
| BasicScopedSequence & | operator= (BasicScopedSequence const &)=delete |
| Deleted copy-assignment operator. | |
| ~BasicScopedSequence () noexcept(false) | |
| Possibly throwing destructor, checking the owned expectations in order of construction. | |
| BasicScopedSequence (auto &&... canary, util::SourceLocation loc={}) | |
| Default-constructor. | |
| BasicScopedSequence (BasicScopedSequence &&)=default | |
| Defaulted move-constructor. | |
| BasicScopedSequence & | operator= (BasicScopedSequence &&)=default |
| Defaulted move-assignment operator. | |
| BasicScopedSequence & | operator+= (sequence::detail::ExpectationBuilderFinalizer< BasicScopedSequence > &&builder) |
| Attaches a newly constructed expectation. | |
| std::deque< ScopedExpectation > const & | expectations () const noexcept |
| Retrieves the collection of explicitly owned expectations. | |
A sequence type that verifies its owned expectations during destruction.
| Strategy | The sequence strategy employed. |
This type offers a convenient mechanism for chaining multiple expectations into a sequence, and it monitors whether they are fulfilled upon destruction.
In essence, it behaves similarly to manually attaching expectations via expect::in_sequence to a sequence. The primary distinction is that if an expectation is not satisfied, this type will report the first unfulfilled expectation. In contrast, when expectations are manually constructed as ScopedExpectation, the last created expectation (due to the stack’s order) would typically be reported.
Nevertheless, all standard sequence rules also apply.
|
nodiscarddelete |
Deleted copy-constructor.
|
inline |
Possibly throwing destructor, checking the owned expectations in order of construction.
|
inlineexplicitnodiscard |
Default-constructor.
|
nodiscarddefault |
Defaulted move-constructor.
|
inlinenodiscardnoexcept |
Retrieves the collection of explicitly owned expectations.
operator +=, and not every expectation that is currently queued in the sequence (i.e. by manually using expect::in_sequence).
|
inline |
Attaches a newly constructed expectation.
| builder | The expectation-builder that will be finalized. |
This function augments the provided expectation-builder with an additional sequence-policy for this sequence and finalizes its construction. Additionally, the sequence takes over the ownership of the constructed ScopedExpectation.
|
default |
Defaulted move-assignment operator.
|
delete |
Deleted copy-assignment operator.