All Manuals > LispWorks Editor User Guide > 4 Editing Lisp Programs

NextPrevUpTopContentsIndex

4.10 Code Coverage

These commands allow you to visualize code coverage data by coloring the source code in a LispWorks editor.

4.10.1 Coloring code coverage

By default, these commands call hcl:editor-color-code-coverage with for-editing t. This means that they find the existing buffer for the file if there is one (always true for Code Coverage Current Buffer), and do not modify the text at all. When used with a prefix argument, these commands pass for-editing nil, which causes creation of a special buffer without a pathname and different name, and then coloring contains counters.

Code Coverage Current Buffer

Editor Command

Argument: None
Key sequence: None

Colors the code in the current buffer with code coverage data.

The file named by the buffer pathname of the current buffer needs to have code coverage data in the default code coverage data. This may be set by hcl:code-coverage-set-editor-default-data or the commands Code Coverage Set Default Data and Code Coverage Load Default Data).

If a prefix argument is supplied, then a buffer without a pathname is created with a different name from the source file, which prevents accidental overwriting of the source file.

The actual coloring is done by calling hcl:editor-color-code-coverage, see the LispWorks User Guide and Reference Manual for details.

See also: Code Coverage File.

Code Coverage File

Editor Command

Argument: None
Key sequence: None

Prompts for a file, opens and colors it with code coverage data in the same way as Code Coverage Current Buffer.

See also: Code Coverage Current Buffer

4.10.2 Setting the default code coverage data

Code Coverage Load Default Data

Editor Command

Argument: None
Key sequence: None

Sets the default code coverage data that the editor uses to color.

The command prompts for a filename, and passes the result to hcl:code-coverage-set-editor-default-data.

See also: Code Coverage Current Buffer

Code Coverage Set Default Data

Editor Command

Argument: None
Key sequence: None

Sets the default code coverage data that the editor uses to color.

The command prompts for a string, reads and evaluates it, and then passes the result to hcl:code-coverage-set-editor-default-data.

See also: Code Coverage Current Buffer


LispWorks Editor User Guide (Macintosh version) - 17 Aug 2017

NextPrevUpTopContentsIndex