All Manuals > LispWorks User Guide and Reference Manual > 38 The HCL Package

NextPrevUpTopContentsIndex

copy-code-coverage-data

copy-current-code-coverage

load-code-coverage-data

save-code-coverage-data

save-current-code-coverage

Functions
Summary

Copy, save and load code-coverage-data objects.

Package

hcl

Signature

copy-code-coverage-data ccd name => new-ccd

copy-current-code-coverage &optional name => new-ccd

load-code-coverage-data pathname &key errorp => ccd

save-code-coverage-data pathname ccd => t

save-current-code-coverage pathname &optional name => t

Arguments

ccd

A code-coverage-data object.

name

A Lisp object, normally a symbol or a string.

pathname

A pathname designator.

Values

new-ccd

A code-coverage-data object.

Description

The function copy-code-coverage-data copies its ccd argument. The copy is deep, such that ccd and new-ccd do not share data, except read-only objects like pathnames. name is the name supplied to the new copy.

The function copy-current-code-coverage copies the internal code coverage data. The default value of name is "Copy".

The function save-code-coverage-data saves the code coverage data in pathname. The saving is done in the same binary form that the compiler and dump-forms-to-file use. The data can be loaded by load-code-coverage-data. save-code-coverage-data always saves to a file with type "ccd". If pathname does not have a type, save-code-coverage-data adds the type "ccd". If pathname has another type, save-code-coverage-data signals an error

The function save-current-code-coverage saves the internal code coverage data. name is the name supplied to the saved data. The default value of name is (pathname-name pathname). Like save-code-coverage-data, save-current-code-coverage always saves to a file with type "ccd".

The function load-code-coverage-data loads code coverage data from pathname and returns it. pathname must name a file that was created by save-code-coverage-data or save-current-code-coverage (with or without the "ccd" type). errorp determines what to do when load-code-coverage-data fails to load. Value nil means return nil, otherwise it calls error. If errorp is true but not t, when load-code-coverage-data calls error it passes errorp as if it is the name of the function that fails. This can be used to give a better indication which function failed. The default value of errorp is t.

Notes

A code-coverage-data object can be also written "by hand" into fasl files using dump-form or dump-forms-to-file. In this case you will need to arrange to recover it when the fasl is loaded. load-code-coverage-data uses load-data-file with a callback.

See also

code-coverage-data
Code Coverage


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex