Macros§
- create_
instrumentation_ visitor - Expand given struct to contain necessary common filed for the coverage visitor with common utility functions.
- instrumentation_
branch_ wrap_ counter_ helper - instrumentation_
counter_ helper - Interfaces to mark counters. Parent node visitor should pick up and insert marked counter accordingly. Unlike istanbul we can’t have single insert logic to be called in any arbitary child node.
- instrumentation_
stmt_ counter_ helper - Create a fn inserts stmt counter for each stmt
- instrumentation_
visitor - Generate common visitors to visit stmt.
- visit_
mut_ for_ like - A macro creates body for the for-variant visitors (for, for-of, for-in) which shares same logic. This also works for other loops like while, do-while.
Structs§
- Branch
- Coverage
Visitor - File
Coverage - provides a read-only view of coverage for a single file.
It has the following properties:
path
- the file path for which coverage is being trackedstatementMap
- map of statement locations keyed by statement indexfnMap
- map of function metadata keyed by function indexbranchMap
- map of branch metadata keyed by branch indexs
- hit counts for statementsf
- hit count for functionsb
- hit count for branches - Function
- Instrument
LogOptions - Instrument
Options - Range
- Source
Map
Enums§
Statics§
Functions§
- create_
coverage_ instrumentation_ visitor - Public interface to create a visitor performs transform to inject coverage instrumentation counter.
Type Aliases§
- Branch
Coverage Map - Branch
HitMap - Branch
Map - Function
Map - Line
HitMap - Map to line number to hit count.
- Statement
Map