racket/collects/htdp/tests/tester.ss
Eli Barzilay 3bc3935fc5 renamed Test directory to tests
svn: r16801
2009-11-16 07:59:47 +00:00

21 lines
388 B
Scheme

#lang scheme
(provide test-error)
(define-syntax test-error
(lambda (stx)
(syntax-case stx ()
[(_ form ...)
(syntax
(with-handlers ([exn? (lambda (e)
(printf "~a~n" (exn-message e))
#t)])
form ...
#f))])))
#| Tests:
(not (test-error 1 2 3))
(test-error (/ 1 0) 2 3)
|#