diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-02-28 11:48:18 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-02-28 11:48:18 +0000 |
commit | 88f9ab70d04f7c28bc96b273a7c8ca2480b7285f (patch) | |
tree | e6b298c50140b7d70c80e14d92b6d0f4b7cf28ab | |
parent | 0bfa4a17a6ce4421ff5ab5be00f3584886aef381 (diff) | |
download | guile-88f9ab70d04f7c28bc96b273a7c8ca2480b7285f.tar.gz |
* Removed old system to check for exceptions.
-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))) |