Skip to content

Commit

Permalink
Merge pull request #87 from dbrgn/float-within
Browse files Browse the repository at this point in the history
Fix float comparison error message
  • Loading branch information
mgold committed Apr 16, 2019
2 parents e90de74 + d5c1b7c commit f42d322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Expect.elm
Original file line number Diff line number Diff line change
Expand Up @@ -739,10 +739,10 @@ equateWith reason comparison b a =

floatError =
if String.contains reason "not" then
"Do not use Expect.notEqual with floats. Use Float.notWithin instead."
"Do not use Expect.notEqual with floats. Use Expect.notWithin instead."

else
"Do not use Expect.equal with floats. Use Float.within instead."
"Do not use Expect.equal with floats. Use Expect.within instead."
in
if usesFloats then
fail floatError
Expand Down

0 comments on commit f42d322

Please sign in to comment.