mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-14 17:35:39 +02:00
Add a Relative Comparison matcher for floating point numbers
It checks Knuth's _close enough with tolerance_ relationship, that is `|lhs - rhs| <= epsilon * max(|lhs|, |rhs|)`, rather then the _very close with tolerance_ relationship that can be written down as `|lhs - rhs| <= epsilon * min(|lhs|, |rhs|)`. This is because it is the more common model around the internet, and as such is likely to be less surprising to the users. In the future we might want to provide the other model as well. Closes #1746
This commit is contained in:
@@ -1381,5 +1381,5 @@ due to unexpected exception with message:
|
||||
|
||||
===============================================================================
|
||||
test cases: 303 | 229 passed | 70 failed | 4 failed as expected
|
||||
assertions: 1597 | 1445 passed | 131 failed | 21 failed as expected
|
||||
assertions: 1615 | 1463 passed | 131 failed | 21 failed as expected
|
||||
|
||||
|
Reference in New Issue
Block a user