Skip to content

Do not use Approx in tests #44

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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