Add check tests in positive case
This commit is contained in:
parent
91a6e7feac
commit
5d6fde455b
|
@ -11,12 +11,19 @@
|
|||
(define (fail-check-unless cond msg)
|
||||
(unless cond (fail-check msg)))
|
||||
|
||||
(module+ test
|
||||
(check-exn exn:test:check?
|
||||
(thunk (fail-check-unless #f "test"))))
|
||||
|
||||
(define-check (check-all-documented module-name)
|
||||
(let* ([undocumented (module->undocumented-exported-names module-name)]
|
||||
[num-undocumented (length undocumented)])
|
||||
(fail-check-unless (zero? num-undocumented)
|
||||
(check-all-documented-message module-name num-undocumented undocumented))))
|
||||
|
||||
(module+ test
|
||||
(check-not-exn (thunk check-all-documented 'racket/promise)))
|
||||
|
||||
(define (check-all-documented-message module-name num-undocumented undocumented)
|
||||
(string-append "Module "
|
||||
(symbol->string module-name)
|
||||
|
@ -35,6 +42,9 @@
|
|||
(fail-check-unless (has-docs? module-name binding)
|
||||
(check-documented-message module-name binding)))
|
||||
|
||||
(module+ test
|
||||
(check-not-exn (thunk (check-documented 'racket/match 'match))))
|
||||
|
||||
(define (check-documented-message module-name binding)
|
||||
(string-append "Module "
|
||||
(symbol->string module-name)
|
||||
|
|
Loading…
Reference in New Issue
Block a user