diff --git a/collects/schemeunit/check.ss b/collects/schemeunit/check.ss index fc6727f3d7..ab5d381064 100644 --- a/collects/schemeunit/check.ss +++ b/collects/schemeunit/check.ss @@ -63,10 +63,16 @@ ([exn? (current-check-handler)]) (thunk)))) +;; top-level-check-around : ( -> a) -> a +(define top-level-check-around + (lambda (thunk) + (check-around thunk) + (void))) + ;; parameter current-check-around : (( -> a) -> a) (define current-check-around (make-parameter - check-around + top-level-check-around (lambda (v) (if (procedure? v) v diff --git a/collects/schemeunit/scribblings/check.scrbl b/collects/schemeunit/scribblings/check.scrbl index 74750ede43..165f123e7b 100644 --- a/collects/schemeunit/scribblings/check.scrbl +++ b/collects/schemeunit/scribblings/check.scrbl @@ -339,4 +339,7 @@ trace. } Parameter containing the function that handles the execution of checks. The default value wraps the evaluation of @scheme[thunk] in a @scheme[with-handlers] call that calls -@scheme[current-check-handler] if an exception is raised. } +@scheme[current-check-handler] if an exception is raised and then +(when an exception is not raised) discards the result, returning +@scheme[(void)]. +}