Using Code Coverage involves four steps, described in this section:
Optionally, you can get a copy of the results and manipulate these before displaying them, as described in Manipulating code coverage data.
Switch on generation of Code Coverage by either calling generate-code-coverage (which switches it globally), or using the macro with-code-coverage-generation (which switches it on only within the dynamic scope of the macro). Then compile your file(s) by calling compile-file. Alternatively you can use something that calls compile-file such as compile-system, menu command File > Compile... or the editor command Compile File
.
Code Coverage works only when compiling into binary files, rather than into memory (which is what some editor commands such as Compile Buffer
do).
When compile-file is called with code coverage generation, it generates code that keeps track of execution and contains some extra data. This results in slightly slower code and larger binary files that use more memory when loaded.
10.1.2 Loading the codeLoad your compiled files as usual by calling cl:load
. Alternatively you can use something that calls cl:load
such as load-system, menu command File > Load... or the editor command Load File
.
When a file that was compiled with code coverage generation is loaded, it automatically adds itself to the internal code-coverage-data structure (overwriting existing data), and from that point any access to this structure (see below) will include information about the code in this file. Executing code that was compiled with code coverage generation always updates the internal code-coverage-data structure (it is not switchable).
10.1.3 Exercising the codeDecide what you want to check, and run the entry points.
Code Coverage measures which parts of the program were executed, so you need to decide what you want to check and call the entry points. In a graphical application, you need to display the main window and interact with it.
LispWorks User Guide and Reference Manual - 20 Sep 2017
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4