QtRocket
 
Loading...
Searching...
No Matches
Catch::Approx Class Reference

#include <catch_amalgamated.hpp>

Public Member Functions

 Approx (double value)
 
Approx operator- () const
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx operator() (T const &value) const
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
 Approx (T const &value)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approxepsilon (T const &newEpsilon)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approxmargin (T const &newMargin)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approxscale (T const &newScale)
 
std::string toString () const
 

Static Public Member Functions

static Approx custom ()
 

Private Member Functions

bool equalityComparisonImpl (double other) const
 
void setMargin (double margin)
 
void setEpsilon (double epsilon)
 

Private Attributes

double m_epsilon
 
double m_margin
 
double m_scale
 
double m_value
 

Friends

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator== (const T &lhs, Approx const &rhs)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator== (Approx const &lhs, const T &rhs)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator!= (T const &lhs, Approx const &rhs)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator!= (Approx const &lhs, T const &rhs)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator<= (T const &lhs, Approx const &rhs)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator<= (Approx const &lhs, T const &rhs)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator>= (T const &lhs, Approx const &rhs)
 
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator>= (Approx const &lhs, T const &rhs)
 

Constructor & Destructor Documentation

◆ Approx() [1/2]

Catch::Approx::Approx ( double value)
explicit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Approx() [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Catch::Approx::Approx ( T const & value)
inlineexplicit
Here is the call graph for this function:

Member Function Documentation

◆ custom()

Approx Catch::Approx::custom ( )
static
Here is the call graph for this function:

◆ epsilon()

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx & Catch::Approx::epsilon ( T const & newEpsilon)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ equalityComparisonImpl()

bool Catch::Approx::equalityComparisonImpl ( double other) const
private
Here is the caller graph for this function:

◆ margin()

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx & Catch::Approx::margin ( T const & newMargin)
inline
Here is the call graph for this function:

◆ operator()()

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx Catch::Approx::operator() ( T const & value) const
inline
Here is the call graph for this function:

◆ operator-()

Approx Catch::Approx::operator- ( ) const
Here is the call graph for this function:

◆ scale()

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx & Catch::Approx::scale ( T const & newScale)
inline
Here is the call graph for this function:

◆ setEpsilon()

void Catch::Approx::setEpsilon ( double epsilon)
private
Here is the caller graph for this function:

◆ setMargin()

void Catch::Approx::setMargin ( double margin)
private
Here is the caller graph for this function:

◆ toString()

std::string Catch::Approx::toString ( ) const
Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator!= [1/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator!= ( Approx const & lhs,
T const & rhs )
friend

◆ operator!= [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator!= ( T const & lhs,
Approx const & rhs )
friend

◆ operator<= [1/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator<= ( Approx const & lhs,
T const & rhs )
friend

◆ operator<= [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator<= ( T const & lhs,
Approx const & rhs )
friend

◆ operator== [1/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator== ( Approx const & lhs,
const T & rhs )
friend

◆ operator== [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator== ( const T & lhs,
Approx const & rhs )
friend

◆ operator>= [1/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator>= ( Approx const & lhs,
T const & rhs )
friend

◆ operator>= [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool operator>= ( T const & lhs,
Approx const & rhs )
friend

Member Data Documentation

◆ m_epsilon

double Catch::Approx::m_epsilon
private

◆ m_margin

double Catch::Approx::m_margin
private

◆ m_scale

double Catch::Approx::m_scale
private

◆ m_value

double Catch::Approx::m_value
private

The documentation for this class was generated from the following files: