tests: improve without-fpe-traps

This commit is contained in:
Daniel Kochmański 2017-01-21 09:26:44 +01:00
parent eddfe4009c
commit e44e7877d9

View file

@ -11,11 +11,12 @@
(suite 'ieee-fp)
(defmacro without-fpe-traps (&body body)
`(unwind-protect
(progn
(si:trap-fpe 'last nil)
,@body)
(si:trap-fpe 'last t)))
`(let ((bits (si:trap-fpe 'cl:last t)))
(unwind-protect
(progn
(si:trap-fpe t nil)
,@body)
(si:trap-fpe bits t))))
(test ieee-fp.0001.infinity-eql
(without-fpe-traps