Skip to content

Commit

Permalink
Add :to-be-close-to docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
snogge committed Aug 27, 2024
1 parent 315d76f commit 6ecee3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions buttercup.el
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,8 @@ See also `buttercup-define-matcher'."
:expect-mismatch-phrase "Expected `%A' < %b, but `%A' was %a.")

(buttercup-define-matcher :to-be-close-to (a b precision)
"Verify that |A-B| < 10^-PRECISION.
\(expect A :to-be-close-to B PRECISION)"
(cl-destructuring-bind
(precision (a-expr . a) (_b-expr . b))
(cons (funcall precision)
Expand Down

0 comments on commit 6ecee3c

Please sign in to comment.