(module testing mzscheme
(require (lib "unit.ss")
(prefix htdp: test-engine/scheme-tests))
(provide teachpack^ teachpack@)
(define-signature teachpack^
[generate-report
(define-syntaxes (check-expect check-within check-error)
(values (lambda (stx) (syntax-case stx ()
[(_ x ...)
#`(begin
#,(syntax/loc stx (htdp:check-expect x ...))
'check-expect-finished)]))
(lambda (stx) (syntax-case stx ()
[(_ x ...)
#`(begin
#,(syntax/loc stx (htdp:check-within x ...))
'check-within-finished)]))
(lambda (stx) (syntax-case stx ()
[(_ x ...)
#`(begin
#,(syntax/loc stx (htdp:check-error x ...))
'check-error-finished)]))))])
(define-unit teachpack@
(import)
(export teachpack^)
(define (generate-report) (htdp:run-tests) (htdp:display-results) 't))
)