| 7957 | namespace Matchers { |
| 7958 | namespace Floating { |
| 7959 | WithinAbsMatcher::WithinAbsMatcher(double target, double margin) |
| 7960 | :m_target{ target }, m_margin{ margin } { |
| 7961 | if (m_margin < 0) { |
| 7962 | throw std::domain_error("Allowed margin difference has to be >= 0"); |
| 7963 | } |
| 7964 | } |
| 7965 | |
| 7966 | // Performs equivalent check of std::fabs(lhs - rhs) <= margin |
| 7967 | // But without the subtraction to allow for INFINITY in comparison |
nothing calls this directly
no outgoing calls
no test coverage detected