mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Started adding tests for Approx
This commit is contained in:
@@ -47,6 +47,17 @@ namespace Catch
|
||||
return fabs( lhs - rhs.m_d ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_d) ) );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template<typename T>
|
||||
friend bool operator ==
|
||||
(
|
||||
const Approx& lhs,
|
||||
const T& rhs
|
||||
)
|
||||
{
|
||||
return operator==( rhs, lhs );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template<typename T>
|
||||
friend bool operator !=
|
||||
@@ -58,7 +69,18 @@ namespace Catch
|
||||
return !operator==( lhs, rhs );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template<typename T>
|
||||
friend bool operator !=
|
||||
(
|
||||
const Approx& lhs,
|
||||
const T& rhs
|
||||
)
|
||||
{
|
||||
return !operator==( rhs, lhs );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
Approx& epsilon
|
||||
(
|
||||
|
Reference in New Issue
Block a user