added checks to run-tests

Related to PR 13936.

original commit: a26101c63fcfbd42c0803203256554a7bbc8afec
This commit is contained in:
Ryan Culpepper 2013-07-30 12:54:58 -04:00
parent daf3ac808a
commit b262a331b2

View File

@ -39,6 +39,7 @@
"private/monad.rkt"
"private/hash-monad.rkt"
"private/name-collector.rkt"
"private/test.rkt"
"private/text-ui-util.rkt")
(provide run-tests
@ -235,6 +236,10 @@
;; run-tests : test [(U 'quiet 'normal 'verbose)] -> integer
(define (run-tests test [mode 'normal])
(unless (or (test-case? test) (test-suite? test))
(raise-argument-error 'run-tests "(or/c test-case? test-suite?)" test))
(unless (memq mode '(quiet normal verbose))
(raise-argument-error 'run-tests "(or/c 'quiet 'normal 'verbose)" mode))
(parameterize ((current-custodian (make-custodian)))
(monad-value
((compose