From: kaoru Date: Thu, 19 Feb 2004 12:44:57 +0000 (+0000) Subject: * lunit.el (lunit-assert): Avoid double-eval `condtion-expr'. X-Git-Tag: flim-1_14_7~22 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=920a5e1168560fa4598da096aa77f0434538cdeb;p=elisp%2Fflim.git * lunit.el (lunit-assert): Avoid double-eval `condtion-expr'. Use ,(not (not condition)) instead of ,condition. --- diff --git a/ChangeLog b/ChangeLog index ca1c344..8b58015 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-19 TAKAHASHI Kaoru + + * lunit.el (lunit-assert): Avoid double-eval `condtion-expr'. + Use ,(not (not condition)) instead of ,condition. + 2004-02-18 TAKAHASHI Kaoru * lunit.el (lunit-make-test-suite-from-class): Restrict test diff --git a/lunit.el b/lunit.el index 7abf22a..10c8707 100644 --- a/lunit.el +++ b/lunit.el @@ -237,7 +237,7 @@ TESTS holds a number of instances of `lunit-test'." (defmacro lunit-assert (condition-expr) "Verify that CONDITION-EXPR returns non-nil; signal an error if not." (let ((condition (eval condition-expr))) - `(unless ,condition + `(when ,(not condition) (signal 'lunit-failure (list ',condition-expr))))) (luna-define-class lunit-test-printer (lunit-test-listener))