Skip to content
This repository was archived by the owner on Oct 9, 2019. It is now read-only.
This repository was archived by the owner on Oct 9, 2019. It is now read-only.

Remove AbsoluteOrRelative floating point tolerance in favor of Expect.any? #232

Open
@mgold

Description

@mgold

Currently we define AbsoluteOrRelative : Float -> Float -> FloatingPointTolerance. It would be a major change to remove the constructor, but I wonder if with Expect.any (#228) if it's still necessary.

So code that currently looks like this

floatingPointValue |> Expect.within (AbsoluteOrRelative 0.5 1.2) target
-- would now look like this
floatingPointValue |> Expect.any
  [ Expect.within (Absolute 0.5) target
  , Expect.within (Relative 1.2) target
  ]

It's definitely more code though, so I'm not completely sure. I wanted to raise the idea though.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions