8#ifndef TWOBLUECUBES_CATCH_MATCHERS_VECTOR_H_INCLUDED
9#define TWOBLUECUBES_CATCH_MATCHERS_VECTOR_H_INCLUDED
25 bool match(std::vector<T>
const &v)
const override {
26 for (
auto const& el : v) {
46 bool match(std::vector<T>
const &v)
const override {
52 for (
const auto& el : v) {
53 if (el == comparator) {
76 bool match(std::vector<T>
const &v)
const override {
83 for (std::size_t i = 0; i < v.size(); ++i)
99 bool match(std::vector<T>
const &v)
const override {
102 for (std::size_t i = 0; i < v.size(); ++i)
110 template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
115 template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
120 template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
133 bool match(std::vector<T>
const& vec)
const override {
136 if (m_target.size() != vec.size()) {
139 return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());
146 std::vector<T>
const& m_target;
Approx & epsilon(T const &newEpsilon)
Approx & margin(T const &newMargin)
Approx & scale(T const &newScale)
std::string stringify(const T &e)
StdString::EqualsMatcher Equals(std::string const &str, CaseSensitive::Choice caseSensitivity)
Vector::ApproxMatcher< T > Approx(std::vector< T > const &comparator)
Vector::ContainsElementMatcher< T > VectorContains(T const &comparator)
Vector::UnorderedEqualsMatcher< T > UnorderedEquals(std::vector< T > const &target)
StdString::ContainsMatcher Contains(std::string const &str, CaseSensitive::Choice caseSensitivity)
#define T(meth, val, expected)
std::string describe() const override
ApproxMatcher & epsilon(T const &newEpsilon)
ApproxMatcher & margin(T const &newMargin)
std::vector< T > const & m_comparator
Catch::Detail::Approx approx
ApproxMatcher(std::vector< T > const &comparator)
ApproxMatcher & scale(T const &newScale)
bool match(std::vector< T > const &v) const override
ContainsElementMatcher(T const &comparator)
bool match(std::vector< T > const &v) const override
std::string describe() const override
std::string describe() const override
std::vector< T > const & m_comparator
ContainsMatcher(std::vector< T > const &comparator)
bool match(std::vector< T > const &v) const override
bool match(std::vector< T > const &v) const override
std::string describe() const override
EqualsMatcher(std::vector< T > const &comparator)
std::vector< T > const & m_comparator
bool match(std::vector< T > const &vec) const override
UnorderedEqualsMatcher(std::vector< T > const &target)
std::string describe() const override