Search in sources :

Example 1 with MutationExecutionResult

use of org.evosuite.coverage.mutation.MutationExecutionResult in project evosuite by EvoSuite.

the class TestChromosome method copyCachedResults.

/* (non-Javadoc)
	 * @see org.evosuite.testcase.ExecutableChromosome#copyCachedResults(org.evosuite.testcase.ExecutableChromosome)
	 */
/**
 * {@inheritDoc}
 */
@Override
public void copyCachedResults(ExecutableChromosome other) {
    if (test == null)
        throw new RuntimeException("Test is null!");
    if (other.lastExecutionResult != null) {
        this.lastExecutionResult = other.lastExecutionResult.clone();
        this.lastExecutionResult.setTest(this.test);
    }
    if (other.lastMutationResult != null) {
        for (Mutation mutation : other.lastMutationResult.keySet()) {
            // .clone();
            MutationExecutionResult copy = other.lastMutationResult.get(mutation);
            // copy.test = test;
            this.lastMutationResult.put(mutation, copy);
        }
    }
}
Also used : MutationExecutionResult(org.evosuite.coverage.mutation.MutationExecutionResult) Mutation(org.evosuite.coverage.mutation.Mutation) ConcolicMutation(org.evosuite.symbolic.ConcolicMutation)

Aggregations

Mutation (org.evosuite.coverage.mutation.Mutation)1 MutationExecutionResult (org.evosuite.coverage.mutation.MutationExecutionResult)1 ConcolicMutation (org.evosuite.symbolic.ConcolicMutation)1