[racket] Checking for exceptions in RackUnit

From: Gregory Woodhouse (gregwoodhouse at me.com)
Date: Mon Jul 30 15:58:53 EDT 2012

Thanks.

On Jul 30, 2012, at 12:16 PM, David Van Horn <dvanhorn at ccs.neu.edu> wrote:

> check-exn should take a thunk as the second argument.  I think you want:
> 
> (test-begin
> (define x (new grid%))
> (check-exn exn:fail?
>            (lambda ()
>              (send x set-cell! 1 1 1)
>              (send x set-cell! 1 2 1))))
> 
> David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120730/d6d13137/attachment-0001.html>

Posted on the users mailing list.