use racket/base for all modules
This commit is contained in:
parent
afea19c4b8
commit
443af8c76e
|
@ -1,3 +1,3 @@
|
|||
(module coverage '#%kernel
|
||||
(module coverage '#%kernel
|
||||
(#%provide coverage)
|
||||
(define-values (coverage) (make-hash)))
|
||||
|
|
5
main.rkt
5
main.rkt
|
@ -1,6 +1,6 @@
|
|||
#lang racket/base
|
||||
(require "cover.rkt" "format.rkt" "private/contracts.rkt" "private/format-utils.rkt"
|
||||
racket/contract)
|
||||
"private/raw.rkt" racket/contract)
|
||||
(provide
|
||||
(contract-out
|
||||
[test-files! (->* () () #:rest (listof path-string?) any/c)]
|
||||
|
@ -12,4 +12,5 @@
|
|||
(#:byte? boolean?)
|
||||
(or/c 'yes 'no 'missing)))]
|
||||
[generate-coveralls-coverage (->* (coverage/c) (path-string?) any)]
|
||||
[generate-html-coverage (->* (coverage/c) (path-string?) any)]))
|
||||
[generate-html-coverage (->* (coverage/c) (path-string?) any)]
|
||||
[generate-raw-coverage (->* (coverage/c) (path-string?) any)]))
|
||||
|
|
|
@ -1,9 +1,22 @@
|
|||
#lang racket
|
||||
#lang racket/base
|
||||
(provide generate-coveralls-coverage)
|
||||
(require racket/runtime-path json "format-utils.rkt" "shared.rkt" racket/pretty)
|
||||
(require json
|
||||
racket/file
|
||||
racket/function
|
||||
racket/list
|
||||
racket/path
|
||||
racket/port
|
||||
racket/pretty
|
||||
racket/runtime-path
|
||||
racket/string
|
||||
racket/system
|
||||
"format-utils.rkt"
|
||||
"shared.rkt")
|
||||
|
||||
|
||||
(module+ test
|
||||
(require rackunit "../cover.rkt" racket/runtime-path))
|
||||
(require rackunit "../cover.rkt" racket/runtime-path)
|
||||
(require (for-syntax racket/base)))
|
||||
|
||||
;; Coveralls
|
||||
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
#lang racket
|
||||
#lang racket/base
|
||||
(provide make-covered?)
|
||||
(require syntax/modread syntax/parse unstable/sequence syntax-color/racket-lexer
|
||||
(require racket/file
|
||||
racket/function
|
||||
racket/list
|
||||
racket/match
|
||||
racket/port
|
||||
racket/set
|
||||
syntax-color/racket-lexer
|
||||
syntax/modread
|
||||
syntax/parse
|
||||
"shared.rkt")
|
||||
(module+ test (require rackunit "../cover.rkt" racket/runtime-path))
|
||||
|
||||
(module+ test (require rackunit "../cover.rkt" racket/runtime-path racket/set))
|
||||
|
||||
;;;;; a Coverage is the output of (get-test-coverage)
|
||||
;;;;; a FileCoverage is the values of the hashmap from (get-test-coverage)
|
||||
|
@ -45,7 +54,7 @@
|
|||
;; TODO should we only ignore test (and main) submodules?
|
||||
(define (make-irrelevant? lexer f)
|
||||
(define s (mutable-set))
|
||||
(define-values (for-lex for-str) (dup-input-port (current-input-port)))
|
||||
(define-values (for-lex for-str) (replicate-input-port (current-input-port)))
|
||||
(define str (apply vector (string->list (port->string for-str))))
|
||||
(define init-offset (- (string-length (file->string f))
|
||||
(vector-length str)))
|
||||
|
@ -82,7 +91,7 @@
|
|||
[_else (void)]))
|
||||
(lambda (i) (set-member? s i)))
|
||||
|
||||
(define (dup-input-port p)
|
||||
(define (replicate-input-port p)
|
||||
(define-values (i1 o1) (make-pipe))
|
||||
(define-values (i2 o2) (make-pipe))
|
||||
(copy-port p o1 o2)
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
#lang racket
|
||||
#lang racket/base
|
||||
(provide generate-html-coverage)
|
||||
(require racket/runtime-path
|
||||
(require racket/file
|
||||
racket/format
|
||||
racket/function
|
||||
racket/list
|
||||
racket/match
|
||||
racket/runtime-path
|
||||
racket/string
|
||||
syntax/modread
|
||||
syntax/parse
|
||||
unstable/sequence
|
||||
|
@ -10,7 +16,7 @@
|
|||
|
||||
|
||||
(module+ test
|
||||
(require rackunit "../cover.rkt" racket/runtime-path)
|
||||
(require rackunit "../cover.rkt" racket/runtime-path racket/set)
|
||||
(define-runtime-path root "..")
|
||||
(define-runtime-path tests/basic/prog.rkt "../tests/basic/prog.rkt"))
|
||||
|
||||
|
|
9
raco.rkt
9
raco.rkt
|
@ -1,7 +1,10 @@
|
|||
#lang racket
|
||||
(require raco/command-name "cover.rkt" "format.rkt" "private/shared.rkt")
|
||||
#lang racket/base
|
||||
(require racket/list racket/cmdline raco/command-name
|
||||
"main.rkt"
|
||||
"private/shared.rkt")
|
||||
|
||||
(module+ test
|
||||
(require rackunit racket/runtime-path))
|
||||
(require rackunit racket/runtime-path racket/set))
|
||||
|
||||
(module+ main
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user