[prev in list] [next in list] [prev in thread] [next in thread]
List: racket-users
Subject: [racket] Checking for exceptions in RackUnit
From: gregwoodhouse () me ! com (Gregory Woodhouse)
Date: 2012-07-30 19:58:53
Message-ID: 13F5ACAD-2BC6-4FA4-B0B4-147173F18EC6 () me ! com
[Download RAW message or body]
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>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic