From: Levente Mészáros Date: Fri, 29 Sep 2006 07:23:33 +0000 (+0200) Subject: Allow to run multiple named tests to be run at once. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=4f250825a6c2a0686666277ab394c31984f62e0c;p=fiveam.git Allow to run multiple named tests to be run at once. --- diff --git a/src/packages.lisp b/src/packages.lisp index 131dfd5..1669ad9 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -28,6 +28,7 @@ #:test #:get-test #:rem-test + #:test-names ;; fixtures #:make-fixture #:def-fixture diff --git a/src/run.lisp b/src/run.lisp index 59e6455..58877e0 100644 --- a/src/run.lisp +++ b/src/run.lisp @@ -171,6 +171,9 @@ run.")) (defmethod %run ((test test-case)) (run-resolving-dependencies test)) +(defmethod %run ((tests list)) + (mapc #'%run tests)) + (defmethod %run ((suite test-suite)) (let ((suite-results '())) (bind-run-state ((result-list '())) diff --git a/src/test.lisp b/src/test.lisp index af7225a..ccdcb0a 100644 --- a/src/test.lisp +++ b/src/test.lisp @@ -15,6 +15,10 @@ :documentation "Lookup table mapping test (and test suite) names to objects.") +(defun test-names () + (loop for test being the hash-keys of *test* + collect test)) + (defmacro test (name &body body) "Create a test named NAME. If NAME is a list it must be of the form: