-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Description
Expected Result
When running code coverage on a project, all branches in a method will be determined, and their targets will be instrumented.
Actual Result
Currently, only sequence points that are targets of branches are instrumented.
Proposed Solution
Implement a branch point/target search using logic similar to OpenCover.Framework.Symbols.CecilSymbolManager. This would allow us to:
- Track Branches separately from Sequence Points.
- Instrument all Branch Targets.
- Provide more detailed branch information to the supported reporters.
Discussion
I've already taken an initial stab at this functionality in my fork and everything seems to be working. I am in the process of cleaning up the code and adding tests, but wanted to open this issue before opening a PR.
Major high-level changes to the structure are as follows:
- Removed
IsBranchTargetfromLineandLineInfoas branches are now tracked separately from sequence points. - Changed
InstrumenterResult- Added
Branchwhich extendsLineand adds additional properties such asPath - Changed
Documentto have bothLinesandBranches
- Added
- Changed
CoverageResult- Updated
Methodsto be a Dictionary with a new classMethodas the Value MethodcontainsLinesandBranches
- Updated
- Changed all supporting code (Instrumenter, CoverageSummary, Reporters) to handle the new model structure.
Metadata
Metadata
Assignees
Labels
No labels