Add contract for run-tests.
original commit: 032e1ebf558087a4abc36394b01641c96138da08
This commit is contained in:
commit
dd6c2d2086
|
@ -184,7 +184,7 @@ The following check fails:
|
|||
@defproc[(check (op (-> any any any))
|
||||
(v1 any)
|
||||
(v2 any)
|
||||
(message string? ""))
|
||||
(message string? ""))
|
||||
void?]{
|
||||
|
||||
The most generic check. Succeeds if @racket[op] applied to
|
||||
|
@ -233,13 +233,13 @@ misspelling errors:
|
|||
|
||||
@defproc*[([(make-check-name (name string?)) check-info?]
|
||||
[(make-check-params (params (listof any))) check-info?]
|
||||
[(make-check-location (loc (list/c any (or/c number? #f) (or/c number? #f)
|
||||
[(make-check-location (loc (list/c any (or/c number? #f) (or/c number? #f)
|
||||
(or/c number? #f) (or/c number? #f))))
|
||||
check-info?]
|
||||
[(make-check-expression (msg any)) check-info?]
|
||||
[(make-check-message (msg string?)) check-info?]
|
||||
[(make-check-actual (param any)) check-info?]
|
||||
[(make-check-expected (param any)) check-info?])]{}
|
||||
[(make-check-expression (msg any)) check-info?]
|
||||
[(make-check-message (msg string?)) check-info?]
|
||||
[(make-check-actual (param any)) check-info?]
|
||||
[(make-check-expected (param any)) check-info?])]{}
|
||||
|
||||
@defproc[(with-check-info* (info (listof check-info?)) (thunk (-> any))) any]{
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
(require racket/match
|
||||
racket/pretty
|
||||
racket/contract
|
||||
"private/base.rkt"
|
||||
"private/counter.rkt"
|
||||
"private/format.rkt"
|
||||
|
@ -39,10 +40,15 @@
|
|||
"private/monad.rkt"
|
||||
"private/hash-monad.rkt"
|
||||
"private/name-collector.rkt"
|
||||
"private/text-ui-util.rkt")
|
||||
"private/text-ui-util.rkt"
|
||||
"private/test.rkt")
|
||||
|
||||
(provide run-tests
|
||||
display-context
|
||||
(provide/contract
|
||||
[run-tests (((or/c test-case? test-suite?))
|
||||
((or/c 'quiet 'normal 'verbose))
|
||||
. ->* . exact-nonnegative-integer?)])
|
||||
|
||||
(provide display-context
|
||||
display-exn
|
||||
display-summary+return
|
||||
display-ticker
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#lang racket
|
||||
#lang racket/base
|
||||
(require rackunit/gui)
|
||||
(provide (all-from-out rackunit/gui))
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#lang racket
|
||||
#lang racket/base
|
||||
(require rackunit/text-ui)
|
||||
(provide (all-from-out rackunit/text-ui))
|
||||
|
|
Loading…
Reference in New Issue
Block a user