Skip to content

Do not use Approx in tests #44

@susilehtola

Description

@susilehtola

According to the Catch2 documentation

We strongly recommend against using Approx when writing new code. You should be using floating point matchers instead.

The tests should accordingly use

  • WithinAbs(double target, double margin),
  • WithinRel(FloatingPoint target, FloatingPoint eps) and
  • WithinULP(FloatingPoint target, uint64_t maxUlpDiff)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestunit-testAdds or modifies a unit test

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions