Re: [racket] Checking for exceptions in RackUnit

2012-07-30 Thread Gregory Woodhouse
Thanks. On Jul 30, 2012, at 12:16 PM, David Van Horn 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!

Re: [racket] Checking for exceptions in RackUnit

2012-07-30 Thread David Van Horn
On 7/30/12 3:13 PM, Gregory Woodhouse wrote: Okay, here's another question related to my little Sudoku project. Before I decided to switch to using rackunit for runit tests, I had a unit test that looked like this (define (test3) (let ([val 'fail] [g (new grid%)]) (with-h

[racket] Checking for exceptions in RackUnit

2012-07-30 Thread Gregory Woodhouse
Okay, here's another question related to my little Sudoku project. Before I decided to switch to using rackunit for runit tests, I had a unit test that looked like this (define (test3) (let ([val 'fail] [g (new grid%)]) (with-handlers ([exn:fail? (lambda (exn) (set! val 'pass))