From 054de64fa29979c6e5bdea2ab9149befd06337ee Mon Sep 17 00:00:00 2001 From: Spencer Florence Date: Wed, 7 Jan 2015 11:04:36 -0500 Subject: [PATCH] fixing issues #13 --- cover.rkt | 4 +++- scribblings/api.scrbl | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cover.rkt b/cover.rkt index 6c86884..ab26384 100644 --- a/cover.rkt +++ b/cover.rkt @@ -19,7 +19,6 @@ ;; Test files and build coverage map ;; returns true if all tests passed (define (test-files! . paths) - (clear-coverage!) (for ([path paths]) (define p (if (absolute-path? path) @@ -88,6 +87,9 @@ (namespace-require `(file ,(path->string strace))) (namespace-require 'rackunit))) +;; A little hack to setup coverage for the first time +(clear-coverage!) + ;; -> [Hashof PathString (Listof (List Boolean srcloc))] ;; returns a hash of file to a list, where the first of the list is if ;; that srcloc was covered or not diff --git a/scribblings/api.scrbl b/scribblings/api.scrbl index 92d4a33..9ac34af 100644 --- a/scribblings/api.scrbl +++ b/scribblings/api.scrbl @@ -11,13 +11,13 @@ functions of test coverage. @defproc[(test-files! (files path-string?) ...) any/c]{ -Clears all coverage information, then tests all given @racket[files] -and stores the coverage information. Returns false if tests -failed. Test coverage information is still collected when test fail.} +Tests all given @racket[files] and stores the coverage information. Returns +false if tests failed. 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.} -@defproc[(get-coverage-information) coverage/c]{Gets coverage information.} +@defproc[(get-coverage-information) coverage/c]{Gets the current coverage information.} @defproc[(make-covered? (coverage file-coverage/c) (path path-string?)) (->* (exact-positive-integer?) (#:byte? boolean?)