From 33610734c16eaf45252d524a245baf27d4fa7ed5 Mon Sep 17 00:00:00 2001 From: Robert Goldman Date: Sun, 18 Nov 2012 05:40:33 +0100 Subject: [PATCH] Return list of failed tests as second value of RUN --- src/run.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 1.7.10.4