7#ifndef TWOBLUECUBES_CATCH_MATCHERS_FLOATING_H_INCLUDED
8#define TWOBLUECUBES_CATCH_MATCHERS_FLOATING_H_INCLUDED
22 struct WithinAbsMatcher : MatcherBase<double> {
24 bool match(
double const& matchee)
const override;
25 std::string
describe()
const override;
31 struct WithinUlpsMatcher : MatcherBase<double> {
33 bool match(
double const& matchee)
const override;
34 std::string
describe()
const override;
46 Floating::WithinUlpsMatcher
WithinULP(
double target,
int maxUlpDiff);
47 Floating::WithinUlpsMatcher
WithinULP(
float target,
int maxUlpDiff);
48 Floating::WithinAbsMatcher
WithinAbs(
double target,
double margin);
Floating::WithinAbsMatcher WithinAbs(double target, double margin)
Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff)
std::string describe() const override
WithinAbsMatcher(double target, double margin)
bool match(double const &matchee) const override
WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType)
bool match(double const &matchee) const override
std::string describe() const override