diff options
-rw-r--r-- | test-suite/ChangeLog | 4 | ||||
-rw-r--r-- | test-suite/lib.scm | 31 |
2 files changed, 5 insertions, 30 deletions
diff --git a/test-suite/ChangeLog b/test-suite/ChangeLog index 234d2f642..b54179a95 100644 --- a/test-suite/ChangeLog +++ b/test-suite/ChangeLog @@ -1,5 +1,9 @@ 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de> + * lib.scm (signals-error?, signals-error?*): Removed. + +2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de> + * lib.scm: Added comment about new convenience functions/macros to test for exceptions. diff --git a/test-suite/lib.scm b/test-suite/lib.scm index 867b8eb7a..7c8436450 100644 --- a/test-suite/lib.scm +++ b/test-suite/lib.scm @@ -38,10 +38,7 @@ make-log-reporter full-reporter user-reporter - format-test-name - - ;; Noticing whether an error occurs. - signals-error? signals-error?*) + format-test-name) ;;;; If you're using Emacs's Scheme mode: @@ -469,29 +466,3 @@ (apply full-reporter result name args))) (set! default-reporter full-reporter) - - -;;;; Detecting whether errors occur - -;;; (signals-error? KEY BODY ...) -;;; Evaluate the expressions BODY ... . If any errors occur, return #t; -;;; otherwise, return #f. -;;; -;;; KEY indicates the sort of errors to look for; it can be a symbol, -;;; indicating that only errors with that name should be caught, or -;;; #t, meaning that any kind of error should be caught. -(defmacro signals-error? key-and-body - `(signals-error?* ,(car key-and-body) - (lambda () ,@(cdr key-and-body)))) - -;;; (signals-error?* KEY THUNK) -;;; Apply THUNK, catching errors. If any errors occur, return #t; -;;; otherwise, return #f. -;;; -;;; KEY indicates the sort of errors to look for; it can be a symbol, -;;; indicating that only errors with that name should be caught, or -;;; #t, meaning that any kind of error should be caught. -(define (signals-error?* key thunk) - (catch key - (lambda () (thunk) #f) - (lambda args #t))) |