From 3958cd22acdae19eecd95e32c5570e9a51032827 Mon Sep 17 00:00:00 2001 From: Marco Baringer Date: Tue, 24 Jan 2006 15:03:52 +0100 Subject: [PATCH] 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. --- src/test.lisp | 5 +++++ 1 file changed, 5 insertions(+) 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. ;; -- 1.7.10.4