From 2f0fabbc0fea5ba9e0847f0cb8053b22811d607d Mon Sep 17 00:00:00 2001 From: "Thomas M. Hermann" Date: Thu, 30 Apr 2009 14:27:13 -0500 Subject: [PATCH] Removed the error condition from NUMBER-EQUAL. If anything other than a NUMBER was passed as an argument to NUMBER-EQUAL, it would throw an error, interrupting the unit testing. In the context of unit testing, it is more useful to simply return NIL and report the failure than to throw an error. --- floating-point.lisp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/floating-point.lisp b/floating-point.lisp index 6dc8860..7048585 100644 --- a/floating-point.lisp +++ b/floating-point.lisp @@ -107,8 +107,7 @@ comparison." ((and (typep number1 '(complex float)) (typep number2 '(complex float))) (%complex-equal number1 number2 epsilon)) ((and (numberp number1) (numberp number2)) - (= number1 number2)) - (t (error "~A and ~A are not numbers." number1 number2)))) + (= number1 number2)))) (defmacro assert-number-equal (expected form &rest extras) (expand-assert :equal form form expected extras :test #'number-equal)) -- 2.11.4.GIT