Modify the internal code-coverage-data object.
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.
t
, some of the files would be restored and some not, leaving the internal code-coverage-data object in an inconsistent state.LispWorks User Guide and Reference Manual - 13 Feb 2015