use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverBitwise method buildTestCaseBitXor.
private static DefaultTestCase buildTestCaseBitXor() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(10 ^ 1);
VariableReference int1 = tc.appendIntPrimitive(10);
Method method = TestCaseBitXor.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 TestSolverMath method buildTestCaseAbs.
private static DefaultTestCase buildTestCaseAbs() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(Integer.MIN_VALUE + 1);
Method method = TestCaseAbs.class.getMethod("test", int.class);
tc.appendMethod(null, method, int0);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverMath method buildTestCaseMax.
private static DefaultTestCase buildTestCaseMax() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(Integer.MIN_VALUE);
VariableReference int1 = tc.appendIntPrimitive(10);
Method method = TestCaseMax.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 TestSolverMath method buildTestCaseMin.
private static DefaultTestCase buildTestCaseMin() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(Integer.MAX_VALUE);
VariableReference int1 = tc.appendIntPrimitive(10);
Method method = TestCaseMin.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 TestSolverReader method buildTestStringReader.
private static DefaultTestCase buildTestStringReader() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference string0 = tc.appendStringPrimitive("Here is Ramon");
Method method = TestCaseReader.class.getMethod("test", String.class);
tc.appendMethod(null, method, string0);
return tc.getDefaultTestCase();
}
Aggregations