From 4460cad7919fde8e2bf119d24807a05f1a1bf493 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Sat, 21 Apr 2012 16:58:41 +0200 Subject: [PATCH] Use DEFGENERIC --- src/explain.lisp | 2 ++ src/run.lisp | 4 ++++ 2 files changed, 6 insertions(+) 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)) -- 1.7.10.4