From 920a5e1168560fa4598da096aa77f0434538cdeb Mon Sep 17 00:00:00 2001 From: kaoru Date: Thu, 19 Feb 2004 12:44:57 +0000 Subject: [PATCH] * lunit.el (lunit-assert): Avoid double-eval `condtion-expr'. Use ,(not (not condition)) instead of ,condition. --- ChangeLog | 5 +++++ lunit.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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)) -- 1.7.10.4