From: Robert Goldman Date: Sun, 18 Nov 2012 04:40:33 +0000 (+0100) Subject: Return list of failed tests as second value of RUN X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=33610734c16eaf45252d524a245baf27d4fa7ed5;p=fiveam.git Return list of failed tests as second value of RUN --- diff --git a/src/run.lisp b/src/run.lisp index 31a3f02..8acdd5e 100644 --- a/src/run.lisp +++ b/src/run.lisp @@ -117,10 +117,12 @@ run.")) (defun results-status (result-list) "Given a list of test results (generated while running a test) return true if all of the results are of type TEST-PASSED, - faile otherwise." - (every (lambda (res) - (typep res 'test-passed)) - result-list)) + fail otherwise. + Returns a second value, which is the set of failed tests." + (let ((failed-tests + (remove-if #'test-passed-p result-list))) + (values (null failed-tests) + failed-tests))) (defun return-result-list (test-lambda) "Run the test function TEST-LAMBDA and return a list of all