use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverFloats method buildTestCaseSqrt.
private static DefaultTestCase buildTestCaseSqrt() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference double0 = tc.appendDoublePrimitive(Math.sqrt(Math.PI));
VariableReference double1 = tc.appendDoublePrimitive(Math.PI);
Method method = TestCaseSqrt.class.getMethod("test", double.class, double.class);
tc.appendMethod(null, method, double0, double1);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverFloats method buildTestCaseGte.
private static DefaultTestCase buildTestCaseGte() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendDoublePrimitive(Math.PI);
VariableReference int1 = tc.appendDoublePrimitive(Math.PI - 1);
Method method = TestCaseFloatGte.class.getMethod("test", double.class, double.class);
tc.appendMethod(null, method, int0, int1);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverFloats method buildTestCaseTan.
private static DefaultTestCase buildTestCaseTan() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference double0 = tc.appendDoublePrimitive(Math.tan(Math.PI));
VariableReference double1 = tc.appendDoublePrimitive(Math.PI);
Method method = TestCaseTan.class.getMethod("test", double.class, double.class);
tc.appendMethod(null, method, double0, double1);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverFloats method buildTestCaseFloatMul.
private static DefaultTestCase buildTestCaseFloatMul() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference double0 = tc.appendDoublePrimitive(2.2);
VariableReference double1 = tc.appendDoublePrimitive(1.1);
Method method = TestCaseFloatMul.class.getMethod("test", double.class, double.class);
tc.appendMethod(null, method, double0, double1);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestMIMEType method buildMIMETypeTest.
private static DefaultTestCase buildMIMETypeTest() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
Method method = MIMETypeTest.class.getMethod("test");
tc.appendMethod(null, method);
return tc.getDefaultTestCase();
}
Aggregations