use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverBitwise method buildTestCaseBitNot.
private static DefaultTestCase buildTestCaseBitNot() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(~10);
VariableReference int1 = tc.appendIntPrimitive(10);
Method method = TestCaseBitNot.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 buildTestCaseDiv.
private static DefaultTestCase buildTestCaseDiv() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(4);
VariableReference int1 = tc.appendIntPrimitive(20);
Method method = TestCaseBinaryOp.class.getMethod("testDiv", 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 buildTestCaseNeq.
private static DefaultTestCase buildTestCaseNeq() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(1000);
VariableReference int1 = tc.appendIntPrimitive(11);
Method method = TestCaseNeq.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 buildTestCaseLt.
private static DefaultTestCase buildTestCaseLt() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(2);
VariableReference int1 = tc.appendIntPrimitive(22);
Method method = TestCaseLt.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 buildTestCaseGte.
private static DefaultTestCase buildTestCaseGte() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(20);
VariableReference int1 = tc.appendIntPrimitive(2);
Method method = TestCaseGte.class.getMethod("test", int.class, int.class);
tc.appendMethod(null, method, int0, int1);
return tc.getDefaultTestCase();
}
Aggregations