From: Lutz Euler Date: Sat, 2 Mar 2013 19:49:30 +0000 (+0100) Subject: Improve the failure output of the test :range-reduction :x87. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=91ceb4051caf4ee96a72009a49c04225ecd37337;p=sbcl.git Improve the failure output of the test :range-reduction :x87. Namely, output the function, argument, expected and actual result. --- diff --git a/tests/float.impure.lisp b/tests/float.impure.lisp index daef1f2..29ca23b 100644 --- a/tests/float.impure.lisp +++ b/tests/float.impure.lisp @@ -248,8 +248,11 @@ (flet ((almost= (x y) (< (abs (- x y)) 1d-5))) (macrolet ((foo (op value) - `(assert (almost= (,op (mod ,value (* 2 pi))) - (,op ,value))))) + `(let ((actual (,op ,value)) + (expected (,op (mod ,value (* 2 pi))))) + (unless (almost= actual expected) + (error "Inaccurate result for ~a: expected ~a, got ~a" + (list ',op ,value) expected actual))))) (let ((big (* pi (expt 2d0 70))) (mid (coerce most-positive-fixnum 'double-float)) (odd (* pi most-positive-fixnum)))