UNDO: Added *debug-on-failure* (Suggested by: Peter Gijsels <peter.gijsels@gmail...
authorMarco Baringer <mb@bese.it>
Wed, 18 Jan 2006 14:42:25 +0000 (15:42 +0100)
committerMarco Baringer <mb@bese.it>
Wed, 18 Jan 2006 14:42:25 +0000 (15:42 +0100)
src/check.lisp
src/packages.lisp

index c5f3cab..e0eb723 100644 (file)
@@ -73,17 +73,6 @@ when appropiate."))
   (:method ((o t)) nil)
   (:method ((o test-skipped)) t))
 
-(defparameter *debug-on-failure* nil
-  "If non-NIL then we drop into a debugger at each test failure.")
-
-(define-condition debug-test-failure (error)
-  ((failed-result :initarg :failed-result :accessor failed-result)
-   (failed-test :initarg :failed-test :accessor failed-test))
-  (:report (lambda (condition stream)
-             (format stream "Test ~S failed with ~S."
-                     (failed-test condition)
-                     (failed-result condition)))))
-
 (defun add-result (result-type &rest make-instance-args)
   "Create a TEST-RESULT object of type RESULT-TYPE passing it the
   initialize args MAKE-INSTANCE-ARGS and adds the resulting
@@ -94,15 +83,7 @@ when appropiate."))
       (etypecase result
        (test-passed  (format *test-dribble* "."))
         (unexpected-test-failure (format *test-dribble* "X"))
-       (test-failure
-         (when *debug-on-failure*
-           (restart-case
-               (invoke-debugger (make-instance 'debug-test-failure
-                                               :failed-test current-test
-                                               :failed-result result))
-             (fail ()
-               :report "Report a test failure and continue.")))
-         (format *test-dribble* "f"))
+       (test-failure (format *test-dribble* "f"))
        (test-skipped (format *test-dribble* "s")))
       (push result result-list))))
 
index 53e30ae..6536e28 100644 (file)
@@ -55,7 +55,6 @@
            #:!!
            #:!!!
           #:*debug-on-error*
-           #:*debug-on-failure*
            #:*verbose-failures*))
 
 ;;;; You can use #+5am to put your test-defining code inline with your