X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fexplain.lisp;h=bb76305f229acbce49e2b9b8880280c1156fc833;hb=6638700caf2d65f4fa0b8494157913dcbe0fe2ee;hp=4e23e0ee71727b2da888e0dcb75f0ca98cfca213;hpb=1454981ac5f4f7ea8fe741a8125efbf0b09497ea;p=fiveam.git diff --git a/src/explain.lisp b/src/explain.lisp index 4e23e0e..bb76305 100644 --- a/src/explain.lisp +++ b/src/explain.lisp @@ -4,6 +4,9 @@ ;;;; * Analyzing the results +(defparameter *verbose-failures* nil + "T if we should print the expression failing, NIL otherwise.") + ;;;; Just as important as defining and runnig the tests is ;;;; understanding the results. FiveAM provides the function EXPLAIN ;;;; which prints a human readable summary (number passed, number @@ -35,6 +38,8 @@ (format stream "~A ~@{[~A]~}: ~%" (name (test-case f)) (description (test-case f))) + (when (and *verbose-failures* (test-expr f)) + (format stream " ~S~%" (test-expr f))) (format stream " ~A.~%" (reason f))) (terpri stream)) (when skipped