X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Ftest.lisp;h=9c52a0b3a73cb5ca9c5c0a61fc8684efbda0509a;hb=4460cad7919fde8e2bf119d24807a05f1a1bf493;hp=e046859f304c05782da044ad3518fc048971ef95;hpb=1b24abf09e9fbb2a23c25a9583e5547514482f1b;p=fiveam.git diff --git a/src/test.lisp b/src/test.lisp index e046859..9c52a0b 100644 --- a/src/test.lisp +++ b/src/test.lisp @@ -1,6 +1,6 @@ ;; -*- lisp -*- -(in-package :it.bese.FiveAM) +(in-package :it.bese.fiveam) ;;;; * Tests @@ -11,11 +11,20 @@ ;;;; collection of checks which can be run and a test suite is a named ;;;; collection of tests and test suites. -(deflookup-table test - :at-redefinition nil - :documentation "Lookup table mapping test (and test suite) +(defvar *test* + (make-hash-table :test 'eql) + "Lookup table mapping test (and test suite) names to objects.") +(defun get-test (key &optional default) + (gethash key *test* default)) + +(defun (setf get-test) (value key) + (setf (gethash key *test*) value)) + +(defun rem-test (key) + (remhash key *test*)) + (defun test-names () (loop for test being the hash-keys of *test* collect test))