use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverSimpleMath method buildTestCaseCastRealToInt.
private static DefaultTestCase buildTestCaseCastRealToInt() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference double0 = tc.appendDoublePrimitive(0.1);
Method method = TestCaseCastRealToInt.class.getMethod("test", double.class);
tc.appendMethod(null, method, double0);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverSimpleMath method buildTestCaseCastIntToReal.
private static DefaultTestCase buildTestCaseCastIntToReal() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(1);
Method method = TestCaseCastIntToReal.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 TestSolverSimpleMath method buildTestCaseSub.
private static DefaultTestCase buildTestCaseSub() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive(1);
VariableReference int1 = tc.appendIntPrimitive(11);
Method method = TestCaseBinaryOp.class.getMethod("testSub", 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 TestSolverTokenizer method buildTestTokenizer.
private static DefaultTestCase buildTestTokenizer() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference string0 = tc.appendStringPrimitive("Here is Ramon");
Method method = TestCaseTokenizer.class.getMethod("test", String.class);
tc.appendMethod(null, method, string0);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverFloats method buildTestCaseFloatDiv.
private static DefaultTestCase buildTestCaseFloatDiv() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference double0 = tc.appendDoublePrimitive(1.1);
VariableReference double1 = tc.appendDoublePrimitive(2.2);
Method method = TestCaseFloatDiv.class.getMethod("test", double.class, double.class);
tc.appendMethod(null, method, double0, double1);
return tc.getDefaultTestCase();
}
Aggregations