mimic++ v4
|
#include "mimic++/Expectation.hpp"
#include "mimic++/Matcher.hpp"
#include "mimic++/Printer.hpp"
#include "mimic++/Utility.hpp"
#include <cassert>
#include <functional>
Go to the source code of this file.
Namespaces | |
namespace | mimicpp |
namespace | mimicpp::expectation_policies |
namespace | mimicpp::expect |
namespace | mimicpp::finally |
namespace | mimicpp::then |
Functions | |
template<std::size_t index, typename Matcher , typename Projection = std::identity> | |
constexpr auto | mimicpp::expect::arg (Matcher &&matcher, Projection projection={}) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Matcher >, Matcher > &&std::is_nothrow_move_constructible_v< Projection >) |
Checks, whether the selected argument matches the given matcher. | |
template<typename Fun > requires std::invocable<std::remove_cvref_t<Fun>&> && (!std::is_void_v<std::invoke_result_t<std::remove_cvref_t<Fun>&>>) | |
constexpr auto | mimicpp::finally::returns_result_of (Fun &&fun) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Fun >, Fun >) |
During the finalization step, the invocation result of the given function is returned. | |
template<typename T > requires std::copyable<std::remove_cvref_t<T>> | |
constexpr auto | mimicpp::finally::returns (T &&value) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< T >, T >) |
During the finalization step, the stored value is returned. | |
template<std::size_t index, std::size_t... otherIndices, typename Action > | |
constexpr auto | mimicpp::finally::returns_apply_result_of (Action &&action) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Action >, Action >) |
During the finalization step, the selected call arguments are applied on the given action. | |
template<typename Action > | |
constexpr auto | mimicpp::finally::returns_apply_all_result_of (Action &&action) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Action >, Action >) |
During the finalization step, all call arguments are applied on the given action. | |
template<std::size_t index> | |
constexpr auto | mimicpp::finally::returns_arg () noexcept |
During the finalization step, the selected call argument is returned. | |
template<typename T > requires std::copyable<std::remove_cvref_t<T>> | |
constexpr expectation_policies::Throws< std::remove_cvref_t< T > > | mimicpp::finally::throws (T &&exception) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< T >, T >) |
During the finalization step, the given exception is thrown. | |
template<std::size_t index, typename Action > | |
constexpr auto | mimicpp::then::apply_arg (Action &&action) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Action >, Action >) |
Applies the argument at the specified index on the given action. | |
template<std::size_t index, std::size_t... additionalIndices, typename Action > | |
constexpr auto | mimicpp::then::apply_args (Action &&action) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Action >, Action >) |
Applies the arguments at the specified index and in that order on the given action. | |
template<typename Action > | |
constexpr auto | mimicpp::then::apply_all (Action &&action) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Action >, Action >) |
Applies all arguments on the given action. | |
template<std::invocable Action> | |
constexpr auto | mimicpp::then::invoke (Action &&action) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Action >, Action >) |
Invokes the given function. | |