From: Stelian Ionescu Date: Sat, 21 Apr 2012 14:58:41 +0000 (+0200) Subject: Use DEFGENERIC X-Git-Url: http://repo.macrolet.net/gitweb/?p=fiveam.git;a=commitdiff_plain;h=4460cad7919fde8e2bf119d24807a05f1a1bf493 Use DEFGENERIC --- diff --git a/src/explain.lisp b/src/explain.lisp index 42c6225..d29a870 100644 --- a/src/explain.lisp +++ b/src/explain.lisp @@ -12,6 +12,8 @@ ;;;; which prints a human readable summary (number passed, number ;;;; failed, what failed and why, etc.) of a list of test results. +(defgeneric explain (explainer results &optional stream recursive-depth)) + (defmethod explain ((exp detailed-text-explainer) results &optional (stream *test-dribble*) (recursive-depth 0)) #| "Given a list of test results report write to stream detailed diff --git a/src/run.lisp b/src/run.lisp index c81aba4..6a10b33 100644 --- a/src/run.lisp +++ b/src/run.lisp @@ -89,6 +89,8 @@ run.")) (setf (status test) :circular)))) (t (status test)))) +(defgeneric resolve-dependencies (depends-on)) + (defmethod resolve-dependencies ((depends-on symbol)) "A test which depends on a symbol is interpreted as `(AND ,DEPENDS-ON)." @@ -128,6 +130,8 @@ run.")) (funcall test-lambda) result-list)) +(defgeneric run-test-lambda (test)) + (defmethod run-test-lambda ((test test-case)) (with-run-state (result-list) (bind-run-state ((current-test test))