diff options
Diffstat (limited to '')
-rw-r--r-- | doc/ref/entry-points.texi | 2 | ||||
-rw-r--r-- | doc/ref/general.texi | 3 | ||||
-rw-r--r-- | doc/ref/general/coverage.texi | 43 |
3 files changed, 45 insertions, 3 deletions
diff --git a/doc/ref/entry-points.texi b/doc/ref/entry-points.texi index 4c4ec90f..e4c19a3a 100644 --- a/doc/ref/entry-points.texi +++ b/doc/ref/entry-points.texi @@ -54,7 +54,7 @@ Generate an FDF (PDF Form submission file) for some very specific time reporting sheets. TODO this should be removed from this project, and moved to a -``private'' repo of hugo. +``private'' repo property of hugo. @end deftp @deftp {Entry Point} update-zoneinfo diff --git a/doc/ref/general.texi b/doc/ref/general.texi index 1810a29b..052594c3 100644 --- a/doc/ref/general.texi +++ b/doc/ref/general.texi @@ -21,8 +21,7 @@ of these should be generally useful in any project. @include general/crypto.texi @include general/graph.texi @include general/options.texi - -@c TODO document (hnh util coverage) +@include general/coverage.texi @include general/util-type.texi @include general/lens.texi diff --git a/doc/ref/general/coverage.texi b/doc/ref/general/coverage.texi new file mode 100644 index 00000000..0c831d40 --- /dev/null +++ b/doc/ref/general/coverage.texi @@ -0,0 +1,43 @@ +@node Code Coverage Utilities +@section Code Coverage Utilities + +The module @code{(hnh util coverage)} provides procedures for working +with the coverage reports returned by Guile's @code{(system vm coverage)}. + +@deftp {Immutable Record} coverage-info + +@defun coverage-info? x +@end defun + +@defvr {Record Field} filename +@end defvr + +@defvr {Record Field} lines +@end defvr + +@defvr {Record Field} total-lines +@end defvr + +@defvr {Record Field} hit-lines +@end defvr + +@end deftp + + +@defun output-coverage coverage [port=(current-output-port)] +Outputs @var{coverage} as a coverage report to @var{port}. Note that +for the output to be a valid coverage file, it must begin with ``TN:'' +as its first line, before any records. +@end defun + +@defun parse-coverage string +Parses coverage data as returned by @code{coverage-data->lcov}. (or +any pre-generated coverage data file). + +Returns a coverage-info object. +@end defun + +@defun merge-coverage a b +Merges the two given coverage info objects into one coverage info +objects. The two objects must reference the same source file. +@end defun |