Function coveragePercent

Calculate the coverage percent from the current project

double coveragePercent (
  CoveredFile[] coveredFiles
);

Example

No files are always 100% covered

[].coveragePercent.should.equal(100);

Example

check a 50% covered file

auto coveredFile = CoveredFile("", true, false, "", 50, [ LineCoverage("     75|  this(File f)"), LineCoverage("     0|  this(File f)") ]);
[coveredFile].coveragePercent.should.equal(50);

Example

check a 50% external covered file

auto coveredFile = CoveredFile("", false, false, "", 0, [ LineCoverage("     0|  this(File f)"), LineCoverage("     0|  this(File f)") ]);
[coveredFile].coveragePercent.should.equal(100);