From: Marco Baringer Date: Tue, 24 Jan 2006 14:03:52 +0000 (+0100) Subject: Added *run-test-when-defined* variable. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=3958cd22acdae19eecd95e32c5570e9a51032827;p=fiveam.git Added *run-test-when-defined* variable. This new variable causes tests to be (using run!) as soon as they are defined. Test suites must still be run explicitly. Idea blatenly stolen from LIFT. --- diff --git a/src/test.lisp b/src/test.lisp index 7d763d1..7fed67d 100644 --- a/src/test.lisp +++ b/src/test.lisp @@ -60,8 +60,13 @@ SUITE defaults to the current value of *SUITE*." ',name) `(setf (gethash ',name (tests (or *suite* (get-test 'NIL)))) ',name)) + (when *run-when-defined* + (run! ',name)) ',name)))) +(defvar *run-test-when-defined* nil + "When non-NIL tests are run as soon as they are defined.") + ;; Copyright (c) 2002-2003, Edward Marco Baringer ;; All rights reserved. ;;