use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverSimpleMath method buildTestCaseAdd.
private static DefaultTestCase buildTestCaseAdd() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(10);
VariableReference int1 = tc.appendIntPrimitive(0);
Method method = TestCaseBinaryOp.class.getMethod("testAdd", int.class, int.class);
tc.appendMethod(null, method, int0, int1);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverSimpleMath method buildTestCaseMul2.
private static DefaultTestCase buildTestCaseMul2() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(5);
VariableReference int1 = tc.appendIntPrimitive(2);
Method method = TestCaseBinaryOp.class.getMethod("testMul2", int.class, int.class);
tc.appendMethod(null, method, int0, int1);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverSimpleMath method buildTestCaseEq.
private static DefaultTestCase buildTestCaseEq() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(11);
VariableReference int1 = tc.appendIntPrimitive(11);
Method method = TestCaseEq.class.getMethod("test", int.class, int.class);
tc.appendMethod(null, method, int0, int1);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverSimpleMath method buildTestCaseGt.
private static DefaultTestCase buildTestCaseGt() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(20);
VariableReference int1 = tc.appendIntPrimitive(2);
Method method = TestCaseGt.class.getMethod("test", int.class, int.class);
tc.appendMethod(null, method, int0, int1);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverSimpleMath method buildTestCaseLte.
private static DefaultTestCase buildTestCaseLte() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(2);
VariableReference int1 = tc.appendIntPrimitive(2);
Method method = TestCaseLte.class.getMethod("test", int.class, int.class);
tc.appendMethod(null, method, int0, int1);
return tc.getDefaultTestCase();
}
Aggregations