public class ConstraintVerifier extends Object
The checks are mainly for debugging EvoSuite, as constraints should always hold by construction. Here we are just interested to see if any mutation does break the constraints
Note: checks here are lightweight (ie not 100% precise), and only check what is in the test, not what should had been there
Created by Andrea Arcuri on 06/06/15.| Constructor and Description |
|---|
ConstraintVerifier() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canDelete(TestCase tc,
int pos)
Can the statement at the given position be deleted?
A case in which it is not possible is for example if it is
using an existing bounded variable
|
static Set<Integer> |
dependentPositions(TestCase tc,
int pos) |
static int |
getAValidPositionForInsertion(GenericAccessibleObject<?> obj,
TestCase tc,
int lastValid) |
static boolean |
hasAnyOnlyForAssertionMethod(TestCase tc)
During the search, assertions have not been generated yet.
|
static boolean |
isValidPositionForInsertion(GenericAccessibleObject<?> obj,
TestCase tc,
int pos) |
static boolean |
verifyTest(TestCase tc) |
static boolean |
verifyTest(TestChromosome tc) |
public static boolean hasAnyOnlyForAssertionMethod(TestCase tc)
tc - public static boolean canDelete(TestCase tc, int pos) throws IllegalArgumentException
tc - pos - IllegalArgumentExceptionpublic static Set<Integer> dependentPositions(TestCase tc, int pos) throws IllegalArgumentException
IllegalArgumentExceptionpublic static boolean isValidPositionForInsertion(GenericAccessibleObject<?> obj, TestCase tc, int pos) throws IllegalArgumentException
IllegalArgumentExceptionpublic static int getAValidPositionForInsertion(GenericAccessibleObject<?> obj, TestCase tc, int lastValid) throws IllegalArgumentException
obj - tc - lastValid - IllegalArgumentExceptionpublic static boolean verifyTest(TestChromosome tc)
public static boolean verifyTest(TestCase tc) throws IllegalArgumentException
tc - IllegalArgumentExceptionCopyright © 2010–2017 EvoSuite. All rights reserved.