From f942b9a5d91833b3f572624084560ba699aaeda5 Mon Sep 17 00:00:00 2001 From: "Thomas M. Hermann" Date: Mon, 15 Oct 2012 21:31:47 -0500 Subject: [PATCH] Miscellaneous clean-up. --- lisp-unit.asd | 2 +- lisp-unit.lisp | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/lisp-unit.asd b/lisp-unit.asd index 5d8d6cb..a3f4250 100644 --- a/lisp-unit.asd +++ b/lisp-unit.asd @@ -26,7 +26,7 @@ (defsystem :lisp-unit :description "Common Lisp library that supports unit testing." - :version "0.9.1" + :version "0.9.2" :author "Thomas M. Hermann " :license "MIT" :components diff --git a/lisp-unit.lisp b/lisp-unit.lisp index 11debc6..8aa831e 100644 --- a/lisp-unit.lisp +++ b/lisp-unit.lisp @@ -131,7 +131,7 @@ assertion.") (defmethod print-failure :around (type form expected actual extras) "Failure header and footer output." - (format t " | Failed Form: ~S" form) + (format t "~& | Failed Form: ~S" form) (call-next-method) (when extras (format t "~{~& | ~S => ~S~}~%" (funcall extras))) @@ -261,10 +261,6 @@ assertion.") name package) (code unit-test)))) -;;; 0.8.1 Compatibility revision for Quicklisp -(defun remove-all-tests (&optional (package *package*)) - (remove-tests :all package)) - (defun remove-tests (names &optional (package *package*)) "Remove individual tests or entire sets." (if (eq :all names) @@ -309,8 +305,7 @@ assertion.") "Return a list of the tags in package." (let ((tags (package-tags package))) (when tags - (loop for tag being each hash-key in tags - collect tag)))) + (loop for tag being each hash-key in tags collect tag)))) (defun tagged-tests (tags &optional (package *package*)) "Run the tests associated with the specified tags in package." @@ -411,11 +406,11 @@ assertion.") (defun internal-assert (type form code-thunk expected-thunk extras test) "Perform the assertion and record the results." - (let ((expected (multiple-value-list (funcall expected-thunk))) - (actual (multiple-value-list (funcall code-thunk))) - (passed nil)) + (let* ((expected (multiple-value-list (funcall expected-thunk))) + (actual (multiple-value-list (funcall code-thunk))) + (passed (test-passed-p type expected actual test))) ;; Count the assertion - (if (setq passed (test-passed-p type expected actual test)) + (if passed (incf *pass*) (incf *fail*)) ;; Report the assertion -- 2.11.4.GIT