factored out a common pattern in tests
This commit is contained in:
parent
542860fc5c
commit
746a346d3d
17
pkgs/htdp-pkgs/htdp-test/2htdp/tests/test-aux.rkt
Normal file
17
pkgs/htdp-pkgs/htdp-test/2htdp/tests/test-aux.rkt
Normal file
|
@ -0,0 +1,17 @@
|
|||
#lang racket/gui
|
||||
|
||||
(require rackunit)
|
||||
|
||||
(provide
|
||||
;; syntax
|
||||
;; (testing e ...) creates a top-level test in its own eventspace that
|
||||
;; shuts down after the tests are run
|
||||
testing
|
||||
(all-from-out rackunit))
|
||||
|
||||
;; -----------------------------------------------------------------------------
|
||||
|
||||
(define-syntax-rule
|
||||
(testing e ...)
|
||||
(begin ;; module+ test
|
||||
(parameterize ((current-eventspace (make-eventspace))) e ...)))
|
Loading…
Reference in New Issue
Block a user