mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-24 13:39:24 +00:00
Started adding tests for Approx
This commit is contained in:
parent
dfea75fc05
commit
0ea29b7d28
2 changed files with 54 additions and 1 deletions
|
@ -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
|
||||
(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue