X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftest.lisp;h=a8269c699dff7a639a6dbdd62bece8f2f9ff557c;hb=51bbd6ac845371a2330e60d09b7e365248dbc9c4;hp=ab0feeb6567c827836f1c1cae9d216cc6f68b7c6;hpb=55740edc3e2b3444e7e17978f68df8eced2b19e7;p=fiveam.git diff --git a/src/test.lisp b/src/test.lisp index ab0feeb..a8269c6 100644 --- a/src/test.lisp +++ b/src/test.lisp @@ -1,4 +1,4 @@ -;; -*- lisp -*- +;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- (in-package :it.bese.fiveam) @@ -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))