public class BranchCoverageTestFitness extends TestFitnessFunction
logger| Constructor and Description |
|---|
BranchCoverageTestFitness(BranchCoverageGoal goal)
Constructor - fitness is specific to a branch
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TestFitnessFunction other)
Used to preorder goals by difficulty
|
boolean |
equals(Object obj) |
Branch |
getBranch()
getBranch
|
boolean |
getBranchExpressionValue()
getBranchExpressionValue
|
BranchCoverageGoal |
getBranchGoal() |
String |
getClassName()
getClassName
|
double |
getFitness(TestChromosome individual,
ExecutionResult result)
getFitness
|
String |
getMethod()
getMethod
|
String |
getTargetClass() |
String |
getTargetMethod() |
double |
getUnfitness(ExecutableChromosome individual,
ExecutionResult result)
getUnfitness
|
boolean |
getValue() |
int |
hashCode() |
String |
toString() |
compareClassName, getFitness, isCovered, isCovered, isCovered, isCovered, isCovered, isCoveredBy, isCoveredByResults, isMaximizationFunction, runTestgetBestStoredIndividual, normalize, updateCoveredGoals, updateIndividual, updateIndividualpublic BranchCoverageTestFitness(BranchCoverageGoal goal) throws IllegalArgumentException
goal - a BranchCoverageGoal
object.IllegalArgumentExceptionpublic boolean getValue()
public BranchCoverageGoal getBranchGoal()
public boolean getBranchExpressionValue()
getBranchExpressionValue
public double getUnfitness(ExecutableChromosome individual, ExecutionResult result)
getUnfitness
individual - a ExecutableChromosome object.result - a ExecutionResult object.public double getFitness(TestChromosome individual, ExecutionResult result)
getFitness
Calculate approach level + branch distancegetFitness in class TestFitnessFunctionindividual - a TestChromosome object.result - a ExecutionResult object.public int hashCode()
hashCode in class TestFitnessFunctionpublic boolean equals(Object obj)
equals in class TestFitnessFunctionpublic int compareTo(TestFitnessFunction other)
TestFitnessFunctioncompareTo in interface Comparable<TestFitnessFunction>compareTo in class TestFitnessFunctionpublic String getTargetClass()
getTargetClass in class TestFitnessFunctionpublic String getTargetMethod()
getTargetMethod in class TestFitnessFunctionCopyright © 2010–2017 EvoSuite. All rights reserved.