From 4f250825a6c2a0686666277ab394c31984f62e0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Levente=20M=C3=A9sz=C3=A1ros?= Date: Fri, 29 Sep 2006 09:23:33 +0200 Subject: [PATCH] Allow to run multiple named tests to be run at once. --- src/packages.lisp | 1 + src/run.lisp | 3 +++ src/test.lisp | 4 ++++ 3 files changed, 8 insertions(+) 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: -- 1.7.10.4