gui/collects/embedded-gui/private/tests/test-macro.ss
Mike MacHenry b74f1b7980 fixed robbys cvs complaint
original commit: d8b0020014998b40e9d3bf9bdf772445b7951aef
2004-10-08 22:41:33 +00:00

18 lines
502 B
Scheme

(module test-macro mzscheme
(require (lib "etc.ss"))
(provide test)
;; test: (lambda (a?) ((a? a? . -> . boolean?) a? a? . -> . (void))
;; tests to see if the expression is true and prints and error if it's not
(define-syntax test
(syntax-rules (identity)
((_ test actual expected)
(let ([result
(with-handlers
([exn? identity])
actual)])
(and (not (exn? result))
(test result expected))))))
)