API
Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch > Struct Template Referenceabstract

#include <catch.hpp>

Inheritance diagram for Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >:
Inheritance graph
Collaboration diagram for Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >:
Collaboration graph

Public Member Functions

 ApproxMatcher (std::vector< T, AllocComp > const &comparator)
 
bool match (std::vector< T, AllocMatch > const &v) const override
 
std::string describe () const override
 
template<typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
ApproxMatcherepsilon (T const &newEpsilon)
 
template<typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
ApproxMatchermargin (T const &newMargin)
 
template<typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
ApproxMatcherscale (T const &newScale)
 
MatchAllOf< T > operator&& (MatcherBase const &other) const
 
MatchAnyOf< T > operator|| (MatcherBase const &other) const
 
MatchNotOf< T > operator! () const
 
std::string toString () const
 
virtual bool match (T const &arg) const=0
 

Public Attributes

std::vector< T, AllocComp > const & m_comparator
 
Catch::Detail::Approx approx = Catch::Detail::Approx::custom()
 

Protected Attributes

std::string m_cachedToString
 

Detailed Description

template<typename T, typename AllocComp, typename AllocMatch>
struct Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >

Definition at line 3681 of file catch.hpp.

Constructor & Destructor Documentation

◆ ApproxMatcher()

template<typename T , typename AllocComp , typename AllocMatch >
Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >::ApproxMatcher ( std::vector< T, AllocComp > const &  comparator)
inline

Definition at line 3683 of file catch.hpp.

Member Function Documentation

◆ describe()

template<typename T , typename AllocComp , typename AllocMatch >
std::string Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >::describe ( ) const
inlineoverridevirtual

Implements Catch::Matchers::Impl::MatcherUntypedBase.

Definition at line 3693 of file catch.hpp.

◆ epsilon()

template<typename T , typename AllocComp , typename AllocMatch >
template<typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
ApproxMatcher& Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >::epsilon ( T const &  newEpsilon)
inline

◆ margin()

template<typename T , typename AllocComp , typename AllocMatch >
template<typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
ApproxMatcher& Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >::margin ( T const &  newMargin)
inline

◆ match() [1/2]

template<typename T , typename AllocComp , typename AllocMatch >
bool Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >::match ( std::vector< T, AllocMatch > const &  v) const
inlineoverride

Definition at line 3685 of file catch.hpp.

◆ match() [2/2]

virtual bool Catch::Matchers::Impl::MatcherMethod< T >::match ( ObjectT const &  arg) const
pure virtualinherited

◆ operator!()

template<typename T >
MatchNotOf< T > Catch::Matchers::Impl::MatcherBase< T >::operator!
inherited

Definition at line 3379 of file catch.hpp.

◆ operator&&()

template<typename T >
MatchAllOf< T > Catch::Matchers::Impl::MatcherBase< T >::operator&& ( MatcherBase< T > const &  other) const
inherited

Definition at line 3371 of file catch.hpp.

◆ operator||()

template<typename T >
MatchAnyOf< T > Catch::Matchers::Impl::MatcherBase< T >::operator|| ( MatcherBase< T > const &  other) const
inherited

Definition at line 3375 of file catch.hpp.

◆ scale()

template<typename T , typename AllocComp , typename AllocMatch >
template<typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
ApproxMatcher& Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >::scale ( T const &  newScale)
inline

◆ toString()

std::string Catch::Matchers::Impl::MatcherUntypedBase::toString ( ) const
inherited

Member Data Documentation

◆ approx

template<typename T , typename AllocComp , typename AllocMatch >
Catch::Detail::Approx Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >::approx = Catch::Detail::Approx::custom()
mutable

Definition at line 3713 of file catch.hpp.

◆ m_cachedToString

std::string Catch::Matchers::Impl::MatcherUntypedBase::m_cachedToString
mutableprotectedinherited

Definition at line 3253 of file catch.hpp.

◆ m_comparator

template<typename T , typename AllocComp , typename AllocMatch >
std::vector<T, AllocComp> const& Catch::Matchers::Vector::ApproxMatcher< T, AllocComp, AllocMatch >::m_comparator

Definition at line 3712 of file catch.hpp.


The documentation for this struct was generated from the following file: