[racket] rackunit positive feedback

From: Russell Adams (RLAdams at AdamsInfoServ.Com)
Date: Tue May 17 13:54:25 EDT 2011

On Tue, May 17, 2011 at 08:39:45AM -0600, Ryan Culpepper wrote:
> Save the old check-around handler:
>
>   (define base-check-around (current-check-around))
>
> The new handler will call the thunk (ie, run the check), and if the
> check succeeds (ie, does not raise an exception), then it prints out
> a message. If the check fails, the exception jumps past the call to
> printf and the base handler prints out the normal failure message.
>
>   (define (my-check-around thunk)
>     (base-check-around
>       (lambda () (begin0 (thunk) (printf "Check passed\n")))))
>
> Install the new handler:
>
>   (current-check-around my-check-around)
>
> Ryan

So close, it prints, but I couldn't use (current-test-name) to include
the name of the check in the output.

So close!


------------------------------------------------------------------
Russell Adams                            RLAdams at AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


Posted on the users mailing list.