factored out a common pattern in tests

This commit is contained in:
Matthias Felleisen 2014-08-18 23:34:46 -04:00
parent 542860fc5c
commit 746a346d3d

View 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 ...)))