Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

SLOC calculation incorrect in code coverage #153

Open
wants to merge 1 commit into from

1 participant

@aomega

Previously, it was only counting lines that were hit exactly once.
Modified to count lines >=1 and SLOC, and ==0 for missing.

John Roberts Modified the cover() function to correctly cound SLOC lines.
Previously, it was only counting lines that were hit exactly once.
Modified to count lines >=1 and SLOC, and ==0 for missing.
5e715b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 8, 2011
  1. Modified the cover() function to correctly cound SLOC lines.

    John Roberts authored
    Previously, it was only counting lines that were hit exactly once.
    Modified to count lines >=1 and SLOC, and ==0 for missing.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  bin/expresso
View
2  bin/expresso
@@ -706,7 +706,7 @@ function populateCoverage(cov) {
function coverage(data, val) {
var n = 0;
for (var i = 0, len = data.length; i < len; ++i) {
- if (data[i] !== undefined && data[i] == val) ++n;
+ if (data[i] !== undefined && val ? data[i] >= 1 : data[i]==0) ++n;
}
return n;
}
Something went wrong with that request. Please try again.