mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Change the threshold param of near to be inclusive
I.e. it means the maximum allowed difference, similar to how other testing frameworks handle this and it allows a threshold of 0 to mean "equal"
This commit is contained in:
parent
e26601672e
commit
98541eb5a7
2 changed files with 4 additions and 3 deletions
|
|
@ -106,7 +106,7 @@ namespace detail
|
|||
# define MOCK_NEAR_DEFINED
|
||||
#endif
|
||||
MOCK_NARY_CONSTRAINT( near, 2, ( expected, tolerance ),
|
||||
std::abs( actual - expected ) < tolerance )
|
||||
std::abs( actual - expected ) <= tolerance )
|
||||
#ifdef MOCK_NEAR_DEFINED
|
||||
# pragma pop_macro( "near" )
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue