org.evosuite.coverage.dataflow.AllDefsCoverageTestFitness Maven / Gradle / Ivy
/**
* Copyright (C) 2010-2018 Gordon Fraser, Andrea Arcuri and EvoSuite
* contributors
*
* This file is part of EvoSuite.
*
* EvoSuite is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3.0 of the License, or
* (at your option) any later version.
*
* EvoSuite is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with EvoSuite. If not, see .
*/
package org.evosuite.coverage.dataflow;
import java.util.Map;
import org.evosuite.Properties;
import org.evosuite.coverage.statement.StatementCoverageTestFitness;
import org.evosuite.testcase.TestChromosome;
import org.evosuite.testcase.TestFitnessFunction;
import org.evosuite.testcase.execution.ExecutionResult;
/**
* Evaluate fitness of a single test case with respect to one Definition-Use
* pair
*
* For more information look at the comment from method getDistance()
*
* @author Andre Mis
*/
public class AllDefsCoverageTestFitness extends TestFitnessFunction {
private static final long serialVersionUID = 1L;
/** Constant singleFitnessTime=0l
*/
public static long singleFitnessTime = 0l;
private final Definition targetDef;
private final TestFitnessFunction goalDefinitionFitness;
private final Map