Search in sources :

Example 71 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class ConcolicExecutionTest method testCase93.

@Test
public void testCase93() throws SecurityException, NoSuchMethodException {
    final int old_length = Properties.DSE_CONSTRAINT_LENGTH;
    DefaultTestCase tc = buildTestCase93();
    List<BranchCondition> branch_conditions = executeTest(tc);
    assertEquals(11, branch_conditions.size());
    Properties.DSE_CONSTRAINT_LENGTH = 33;
    List<BranchCondition> branch_conditions1 = executeTest(tc);
    assertEquals(10, branch_conditions1.size());
    Properties.DSE_CONSTRAINT_LENGTH = 5;
    List<BranchCondition> branch_conditions2 = executeTest(tc);
    assertEquals(2, branch_conditions2.size());
    Properties.DSE_CONSTRAINT_LENGTH = old_length;
    List<BranchCondition> branch_conditions3 = executeTest(tc);
    assertEquals(11, branch_conditions3.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Example 72 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class ConcolicExecutionTest method testCase96.

@Test
public void testCase96() throws SecurityException, NoSuchMethodException {
    DefaultTestCase tc = buildTestCase96();
    List<BranchCondition> branch_conditions = executeTest(tc);
    assertEquals(2, branch_conditions.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Example 73 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class ConcolicExecutionTest method testCase10.

@Test
public void testCase10() throws SecurityException, NoSuchMethodException {
    DefaultTestCase tc = buildTestCase10();
    List<BranchCondition> branch_conditions = executeTest(tc);
    assertEquals(1, branch_conditions.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Example 74 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class ConcolicExecutionTest method testCase7.

@Test
public void testCase7() throws SecurityException, NoSuchMethodException {
    DefaultTestCase tc = buildTestCase7();
    List<BranchCondition> branch_conditions = executeTest(tc);
    assertEquals(0, branch_conditions.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Example 75 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class ConcolicExecutionTest method testCase28.

@Test
public void testCase28() throws SecurityException, NoSuchMethodException {
    DefaultTestCase tc = buildTestCase28();
    List<BranchCondition> branch_conditions = executeTest(tc);
    assertEquals(5, branch_conditions.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Aggregations

DefaultTestCase (org.evosuite.testcase.DefaultTestCase)347 Test (org.junit.Test)234 Constraint (org.evosuite.symbolic.expr.Constraint)101 TestCase (org.evosuite.testcase.TestCase)78 ArrayList (java.util.ArrayList)63 CoverageGoalTestNameGenerationStrategy (org.evosuite.junit.naming.methods.CoverageGoalTestNameGenerationStrategy)47 MethodCoverageTestFitness (org.evosuite.coverage.method.MethodCoverageTestFitness)45 IntPrimitiveStatement (org.evosuite.testcase.statements.numeric.IntPrimitiveStatement)41 VariableReference (org.evosuite.testcase.variable.VariableReference)37 TestCaseStringAppendString (com.examples.with.different.packagename.solver.TestCaseStringAppendString)27 TestCaseStringIndexOfString (com.examples.with.different.packagename.solver.TestCaseStringIndexOfString)27 TestCaseStringLastIndexOfString (com.examples.with.different.packagename.solver.TestCaseStringLastIndexOfString)27 IntegerConstraint (org.evosuite.symbolic.expr.IntegerConstraint)27 OutputCoverageGoal (org.evosuite.coverage.io.output.OutputCoverageGoal)25 OutputCoverageTestFitness (org.evosuite.coverage.io.output.OutputCoverageTestFitness)25 TestSuiteChromosome (org.evosuite.testsuite.TestSuiteChromosome)18 GenericMethod (org.evosuite.utils.generic.GenericMethod)17 TestChromosome (org.evosuite.testcase.TestChromosome)16 Method (java.lang.reflect.Method)14 BranchCoverageSuiteFitness (org.evosuite.coverage.branch.BranchCoverageSuiteFitness)14