gui/collects/embedded-gui/private/tests/test-macro.ss
Eli Barzilay fcca6b5af9 make all files terminate with a newline
svn: r8786

original commit: bb34f747b60bb4b06e0c2098e9c591677fb49d57
2008-02-24 21:27:36 +00:00

19 lines
498 B
Scheme

(module test-macro mzscheme
(require mzlib/etc)
(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))))))
)