tests which expect an inexact value can accept an equivalent exact value

This commit is contained in:
Alex Shinn 2018-03-17 16:50:41 +09:00
parent f0c9f0e705
commit 933aeb5654

View file

@ -664,7 +664,9 @@
(if (real? expect) (if (real? expect)
(and (inexact? expect) (and (inexact? expect)
(real? res) (real? res)
(inexact? res) ;; tests which expect an inexact value can
;; accept an equivalent exact value
;; (inexact? res)
(approx-equal? expect res (current-test-epsilon))) (approx-equal? expect res (current-test-epsilon)))
(and (complex? res) (and (complex? res)
(complex? expect) (complex? expect)