Package com.spertus.jacquard.coverage
Class LinearLineScorer
java.lang.Object
com.spertus.jacquard.coverage.Scorer
com.spertus.jacquard.coverage.LinearScorer
com.spertus.jacquard.coverage.LinearLineScorer
A linear scorer that considers only line coverage, not branch coverage.
For example, if
LinearScorer.score(double, double)
is called on a linear scorer
with a maximum score of 10 and line coverage of .95, the score 9.5 would be
returned, regardless of the branch coverage percent.-
Field Summary
-
Constructor Summary
ConstructorDescriptionLinearLineScorer
(double maxPoints) Creates a linear scorer that considers only line coverage, not branch coverage. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getMessage
(double branchCoverage, double lineCoverage) Gets a message summarizing information about the coverage being tested.Methods inherited from class com.spertus.jacquard.coverage.LinearScorer
getResult, score
-
Constructor Details
-
LinearLineScorer
public LinearLineScorer(double maxPoints) Creates a linear scorer that considers only line coverage, not branch coverage.- Parameters:
maxPoints
- the maximum number of points
-
-
Method Details
-
getMessage
Description copied from class:LinearScorer
Gets a message summarizing information about the coverage being tested.- Overrides:
getMessage
in classLinearScorer
- Parameters:
branchCoverage
- the branch coverage ratio [0, 1]lineCoverage
- the line coverage ratio [0, 1]- Returns:
- a message
-