From 0c7301c2d479750af4ab6c073e93b4003b7cbb60 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 16 Oct 2009 14:33:25 +0000 Subject: [PATCH] changed top-level checks so they return (void), so nothing is printed at the top-level of a module svn: r16339 original commit: 2043cb19ff55d572ee8dcb6e579092f37e4a295a --- collects/schemeunit/check.ss | 8 +++++++- collects/schemeunit/scribblings/check.scrbl | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/collects/schemeunit/check.ss b/collects/schemeunit/check.ss index fc6727f..ab5d381 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 74750ed..165f123 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)]. +}