| 11638 | } |
| 11639 | |
| 11640 | WithinRelMatcher::WithinRelMatcher(double target, double epsilon): |
| 11641 | m_target(target), |
| 11642 | m_epsilon(epsilon){ |
| 11643 | CATCH_ENFORCE(m_epsilon >= 0., "Relative comparison with epsilon < 0 does not make sense."); |
| 11644 | CATCH_ENFORCE(m_epsilon < 1., "Relative comparison with epsilon >= 1 does not make sense."); |
| 11645 | } |
| 11646 | |
| 11647 | bool WithinRelMatcher::match(double const& matchee) const { |
| 11648 | const auto relMargin = m_epsilon * (std::max)(std::fabs(matchee), std::fabs(m_target)); |
nothing calls this directly
no outgoing calls
no test coverage detected