Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch Enhancements #69

Closed
wants to merge 142 commits into from
Closed

Branch Enhancements #69

wants to merge 142 commits into from

Conversation

hunterjm
Copy link
Contributor

@hunterjm hunterjm commented May 1, 2018

Description

This PR covers a lot of changes in order to better support branch coverage. The main purpose of this refactor is two-fold. First, to add improved support for branch coverage. Second, to improve the output of the 3 supported report formats by adding previously missing information.

At a high level, this PR covers the objectives by:

  • Resolving Enhanced Branch Coverage #67.
    • Updated all report generators with new branch logic.
  • Changing Coverage Calculation from average of averages to a single average of the sums of covered/total points (for line, branch, and method).
    • Utilized the new CoverageDetails result model from CoverageSummary in report generators in lieu of manually tracking and incrementing visits and counts.

laurentkempe and others added 30 commits March 21, 2018 14:38
ensure instrumentation code becomes the new target
Check if the file HitsFilePath exists
Fix errors when using multiple referenced libraries.
CalculateCoverage: Fix file not foundexception
Check for totalLines to be 0 in CoverageSummary.
fix open cover reporter so that it uses unique ids over multiple modules
Fixes assembly resolution so it scans the module directory as well.
@hunterjm
Copy link
Contributor Author

hunterjm commented May 1, 2018

@tonerdo - Merge conflicts fixed.


var pathInstr = Instruction.Create(OpCodes.Ldstr, _result.HitsFilePath);
var markInstr = Instruction.Create(OpCodes.Ldstr, marker);
var callInstr = Instruction.Create(OpCodes.Call, processor.Body.Method.Module.ImportReference(typeof(CoverageTracker).GetMethod("MarkExecuted")));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change the ImportReference() call to use the one-off _markExecutedMethodLoader.Value too? Other than that this looks good!

@hunterjm
Copy link
Contributor Author

hunterjm commented May 2, 2018

Wow, I royally screwed something up here. I was working on my work laptop and somehow messed up the git history for this repo. I'm probably going to close this PR, delete my fork, and open a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants