mimic++ v6
Loading...
Searching...
No Matches
RangeMatchers.hpp File Reference
#include "mimic++/Fwd.hpp"
#include "mimic++/matchers/Common.hpp"
#include "mimic++/matchers/GeneralMatchers.hpp"
#include <algorithm>
#include <concepts>
#include <functional>
#include <ranges>
#include <tuple>
#include <utility>
Include dependency graph for RangeMatchers.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mimicpp
 
namespace  mimicpp::matches
 
namespace  mimicpp::matches::range
 

Functions

template<std::ranges::forward_range Range, typename Comparator = std::equal_to<>>
constexpr auto mimicpp::matches::range::eq (Range &&expected, Comparator comparator=Comparator{})
 Tests, whether the target range compares equal to the expected range, by comparing them element-wise.
 
template<std::ranges::forward_range Range, typename Comparator = std::equal_to<>>
constexpr auto mimicpp::matches::range::unordered_eq (Range &&expected, Comparator comparator=Comparator{})
 Tests, whether the target range is a permutation of the expected range, by comparing them element-wise.
 
template<typename Relation = std::ranges::less>
constexpr auto mimicpp::matches::range::is_sorted (Relation relation=Relation{})
 Tests, whether the target range is sorted, by applying the relation on each adjacent elements.
 
constexpr auto mimicpp::matches::range::is_empty ()
 Tests, whether the target range is empty.
 
constexpr auto mimicpp::matches::range::has_size (const std::integral auto expected)
 Tests, whether the target range has the expected size.
 
template<typename Matcher>
constexpr auto mimicpp::matches::range::each_element (Matcher &&matcher)
 Tests, whether each element of the target range matches the specified matcher.
 
template<typename Matcher>
constexpr auto mimicpp::matches::range::any_element (Matcher &&matcher)
 Tests, whether any element of the target range matches the specified matcher.