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

NextPrevUpTopContentsIndex

clear-code-coverage

reset-code-coverage

restore-code-coverage-data

Functions
Summary

Modify the internal code-coverage-data object.

Package

hcl

Signature

clear-code-coverage => result

reset-code-coverage => result

restore-code-coverage-data code-coverage-data &key error => result

Arguments

code-coverage-data

A code-coverage-data object.

error

:warn, nil or t.

Value

result

A boolean.

Description

The function clear-code-coverage clears the internal code-coverage-data object, which means removing all the files from it, so that their counters are not accessible anymore. Note that it does not actually remove the counters from the code.

The function reset-code-coverage resets all the counters in the internal code-coverage-data object to 0.

The function restore-code-coverage-data sets the counters of all files that appear in both the internal code coverage data and the argument code-coverage-data to the counters in the code-coverage-data argument. All these files need to have the same code coverage code, that is they must be based on the same binary file.

error controls what happens for files that do not have the same code coverage code. Value :warn means warn and continue, nil means quietly skip it, and t means signal an error. restore-code-coverage-data never restores a file with no matching code coverage code. The default value of error is :warn.

The value of result indicates whether there was an internal code-coverage-data object when the function was called.

Notes
  1. If error is t, some of the files would be restored and some not, leaving the internal code-coverage-data object in an inconsistent state.
  2. All these functions also reset any snapshot by calling reset-code-coverage-snapshot.
See also

Code Coverage


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex