Package com.spertus.jacquard.coverage
Class LinearBranchScorer
java.lang.Object
com.spertus.jacquard.coverage.Scorer
com.spertus.jacquard.coverage.LinearScorer
com.spertus.jacquard.coverage.LinearBranchScorer
A linear scorer that considers only branch coverage, not line coverage.
For example, if
LinearScorer.score(double, double) is called on a linear branch
scorer with max points of 100 and branch coverage of .85, the score 85 would be
returned, regardless of the line coverage percent.-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionLinearBranchScorer(double maxPoints) Creates a linear scorer that considers only branch coverage, not line coverage. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetMessage(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
-
LinearBranchScorer
public LinearBranchScorer(double maxPoints) Creates a linear scorer that considers only branch coverage, not line coverage.- Parameters:
maxPoints- the maximum number of points
-
-
Method Details
-
getMessage
Description copied from class:LinearScorerGets a message summarizing information about the coverage being tested.- Overrides:
getMessagein classLinearScorer- Parameters:
branchCoverage- the branch coverage ratio [0, 1]lineCoverage- the line coverage ratio [0, 1]- Returns:
- a message
-