diff --git a/collects/rackunit/private/check.rkt b/collects/rackunit/private/check.rkt index fc3e723..3ad4b58 100644 --- a/collects/rackunit/private/check.rkt +++ b/collects/rackunit/private/check.rkt @@ -251,7 +251,7 @@ (equal? expr1 expr2)) (define-simple-check (check-= expr1 expr2 epsilon) - (<= (abs (- expr1 expr2)) epsilon)) + (<= (magnitude (- expr1 expr2)) epsilon)) (define-simple-check (check-true expr) (eq? expr #t)) diff --git a/collects/rackunit/scribblings/check.scrbl b/collects/rackunit/scribblings/check.scrbl index 83850a2..e7ebbbd 100644 --- a/collects/rackunit/scribblings/check.scrbl +++ b/collects/rackunit/scribblings/check.scrbl @@ -68,7 +68,7 @@ The following check fails: @defproc[(check-= (v1 any) (v2 any) (epsilon number?) (message string? "")) void?]{ -Checks that @racket[v1] and @racket[v2] are within +Checks that @racket[v1] and @racket[v2] are numbers within @racket[epsilon] of one another. The optional @racket[message] is included in the output if the check fails.