Search in sources :

Example 66 with Constraint

use of org.evosuite.symbolic.expr.Constraint in project evosuite by EvoSuite.

the class TestSolverStringFunctions method testStringStartsWithIndex.

public static Map<String, Object> testStringStartsWithIndex(Solver solver) throws SecurityException, NoSuchMethodException, SolverTimeoutException {
    DefaultTestCase tc = buildTestStartsWithIndex();
    Collection<Constraint<?>> constraints = DefaultTestCaseConcolicExecutor.execute(tc);
    Map<String, Object> solution = solve(solver, constraints);
    return solution;
}
Also used : IntegerConstraint(org.evosuite.symbolic.expr.IntegerConstraint) Constraint(org.evosuite.symbolic.expr.Constraint) DefaultTestCase(org.evosuite.testcase.DefaultTestCase) TestCaseStringAppendString(com.examples.with.different.packagename.solver.TestCaseStringAppendString) TestCaseStringLastIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringLastIndexOfString) TestCaseStringIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringIndexOfString)

Example 67 with Constraint

use of org.evosuite.symbolic.expr.Constraint in project evosuite by EvoSuite.

the class TestSolverStringFunctions method testStringLastIndexOfCharInt.

public static Map<String, Object> testStringLastIndexOfCharInt(Solver solver) throws SecurityException, NoSuchMethodException, SolverTimeoutException {
    DefaultTestCase tc = buildTestLastIndexOfCharInt();
    Collection<Constraint<?>> constraints = DefaultTestCaseConcolicExecutor.execute(tc);
    Map<String, Object> solution = solve(solver, constraints);
    return solution;
}
Also used : IntegerConstraint(org.evosuite.symbolic.expr.IntegerConstraint) Constraint(org.evosuite.symbolic.expr.Constraint) DefaultTestCase(org.evosuite.testcase.DefaultTestCase) TestCaseStringAppendString(com.examples.with.different.packagename.solver.TestCaseStringAppendString) TestCaseStringLastIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringLastIndexOfString) TestCaseStringIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringIndexOfString)

Example 68 with Constraint

use of org.evosuite.symbolic.expr.Constraint in project evosuite by EvoSuite.

the class TestSolverStringFunctions method testStringReplaceCharSequence.

public static Map<String, Object> testStringReplaceCharSequence(Solver solver) throws SecurityException, NoSuchMethodException, SolverTimeoutException {
    DefaultTestCase tc = buildTestReplaceCharSequence();
    Collection<Constraint<?>> constraints = DefaultTestCaseConcolicExecutor.execute(tc);
    Map<String, Object> solution = solve(solver, constraints);
    return solution;
}
Also used : IntegerConstraint(org.evosuite.symbolic.expr.IntegerConstraint) Constraint(org.evosuite.symbolic.expr.Constraint) DefaultTestCase(org.evosuite.testcase.DefaultTestCase) TestCaseStringAppendString(com.examples.with.different.packagename.solver.TestCaseStringAppendString) TestCaseStringLastIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringLastIndexOfString) TestCaseStringIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringIndexOfString)

Example 69 with Constraint

use of org.evosuite.symbolic.expr.Constraint in project evosuite by EvoSuite.

the class TestSolverStringFunctions method testStringLowerCase.

public static Map<String, Object> testStringLowerCase(Solver solver) throws SecurityException, NoSuchMethodException, SolverTimeoutException {
    DefaultTestCase tc = buildTestLowerCase();
    Collection<Constraint<?>> constraints = DefaultTestCaseConcolicExecutor.execute(tc);
    Map<String, Object> solution = solve(solver, constraints);
    return solution;
}
Also used : IntegerConstraint(org.evosuite.symbolic.expr.IntegerConstraint) Constraint(org.evosuite.symbolic.expr.Constraint) DefaultTestCase(org.evosuite.testcase.DefaultTestCase) TestCaseStringAppendString(com.examples.with.different.packagename.solver.TestCaseStringAppendString) TestCaseStringLastIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringLastIndexOfString) TestCaseStringIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringIndexOfString)

Example 70 with Constraint

use of org.evosuite.symbolic.expr.Constraint in project evosuite by EvoSuite.

the class TestSolverStringFunctions method testStringLastIndexOfStringInt.

public static Map<String, Object> testStringLastIndexOfStringInt(Solver solver) throws SecurityException, NoSuchMethodException, SolverTimeoutException {
    DefaultTestCase tc = buildTestLastIndexOfStringInt();
    Collection<Constraint<?>> constraints = DefaultTestCaseConcolicExecutor.execute(tc);
    Map<String, Object> solution = solve(solver, constraints);
    return solution;
}
Also used : IntegerConstraint(org.evosuite.symbolic.expr.IntegerConstraint) Constraint(org.evosuite.symbolic.expr.Constraint) DefaultTestCase(org.evosuite.testcase.DefaultTestCase) TestCaseStringAppendString(com.examples.with.different.packagename.solver.TestCaseStringAppendString) TestCaseStringLastIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringLastIndexOfString) TestCaseStringIndexOfString(com.examples.with.different.packagename.solver.TestCaseStringIndexOfString)

Aggregations

Constraint (org.evosuite.symbolic.expr.Constraint)210 DefaultTestCase (org.evosuite.testcase.DefaultTestCase)101 IntegerConstraint (org.evosuite.symbolic.expr.IntegerConstraint)83 Test (org.junit.Test)81 EvoSuiteSolver (org.evosuite.symbolic.solver.avm.EvoSuiteSolver)76 SolverTimeoutException (org.evosuite.symbolic.solver.SolverTimeoutException)75 ArrayList (java.util.ArrayList)68 IntegerConstant (org.evosuite.symbolic.expr.bv.IntegerConstant)42 SolverResult (org.evosuite.symbolic.solver.SolverResult)36 StringVariable (org.evosuite.symbolic.expr.str.StringVariable)34 StringConstraint (org.evosuite.symbolic.expr.StringConstraint)33 TestCaseStringAppendString (com.examples.with.different.packagename.solver.TestCaseStringAppendString)28 TestCaseStringIndexOfString (com.examples.with.different.packagename.solver.TestCaseStringIndexOfString)28 TestCaseStringLastIndexOfString (com.examples.with.different.packagename.solver.TestCaseStringLastIndexOfString)28 RealConstraint (org.evosuite.symbolic.expr.RealConstraint)26 IntegerVariable (org.evosuite.symbolic.expr.bv.IntegerVariable)26 RealVariable (org.evosuite.symbolic.expr.fp.RealVariable)23 StringConstant (org.evosuite.symbolic.expr.str.StringConstant)22 StringBinaryComparison (org.evosuite.symbolic.expr.bv.StringBinaryComparison)17 RealConstant (org.evosuite.symbolic.expr.fp.RealConstant)16