safer contract and docs
This commit is contained in:
parent
4986abc0ab
commit
6e77ba5b12
6
main.rkt
6
main.rkt
|
@ -1,6 +1,7 @@
|
|||
#lang racket/base
|
||||
(require "cover.rkt" "format.rkt" "private/contracts.rkt" "private/format-utils.rkt"
|
||||
"private/raw.rkt" racket/contract)
|
||||
|
||||
(provide
|
||||
(contract-out
|
||||
[coverage/c contract?]
|
||||
|
@ -8,8 +9,9 @@
|
|||
[test-files! (->* () (#:submod symbol?)
|
||||
#:rest
|
||||
(listof (or/c path-string?
|
||||
(list/c path-string? (vectorof string?
|
||||
#:immutable #t))))
|
||||
(list/c path-string?
|
||||
(and/c (lambda (v) (not (impersonator? v)))
|
||||
(vectorof string? #:immutable #t)))))
|
||||
any)]
|
||||
[clear-coverage! (-> any)]
|
||||
[get-test-coverage (-> coverage/c)]
|
||||
|
|
|
@ -26,12 +26,19 @@ removed during macro expansion and are thus neither run or not run.
|
|||
Note that the @racket[srcloc]s are one indexed, meaning a @racket[1]
|
||||
represents the first character in the file.}
|
||||
|
||||
@defproc[(test-files! (#:submod submod symbol? 'test) (files path-string?) ...) any]{
|
||||
@defproc[(test-files! (#:submod submod symbol? 'test)
|
||||
(files (or/c path-string?
|
||||
(list/c path-string
|
||||
(and/c (negate impersonator?)
|
||||
(vectorof string? #:immutable #t))))) ...)
|
||||
any]{
|
||||
|
||||
Runs all given @racket[files] and their submodule @racket[submod] (if it exists), storing the coverage information.
|
||||
The function returns false if any tests fail.
|
||||
Test coverage information is still collected when test fail.
|
||||
Test coverage info is added to existing coverage info.}
|
||||
Runs all given @racket[files] and their submodule @racket[submod] (if it exists), storing the
|
||||
coverage information. If the path is paired with a vector then that vector is used as the
|
||||
@racket[current-command-line-arguments] when executing that file. This vector must be immuatable and
|
||||
not wrapped by a @racket[chaperone] or @racket[impersonator]. The function returns false if any
|
||||
tests fail. Test coverage information is still collected when test fail. Test coverage info is
|
||||
added to existing coverage info.}
|
||||
|
||||
@defproc[(clear-coverage!) any]{Clears all coverage information.}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user