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