use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverFloats method buildTestCaseLt.
private static DefaultTestCase buildTestCaseLt() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendDoublePrimitive(Math.PI - 1);
VariableReference int1 = tc.appendDoublePrimitive(Math.PI);
Method method = TestCaseFloatLt.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 buildTestCaseSin.
private static DefaultTestCase buildTestCaseSin() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference double0 = tc.appendDoublePrimitive(Math.sin(Math.PI));
VariableReference double1 = tc.appendDoublePrimitive(Math.PI);
Method method = TestCaseSin.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 buildTestCaseNeq.
private static DefaultTestCase buildTestCaseNeq() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference double0 = tc.appendDoublePrimitive(Math.PI);
VariableReference double1 = tc.appendDoublePrimitive(Math.E);
Method method = TestCaseFloatNeq.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 buildTestCaseRound.
private static DefaultTestCase buildTestCaseRound() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference int0 = tc.appendIntPrimitive((int) Math.round(Math.PI));
VariableReference double1 = tc.appendDoublePrimitive(Math.PI);
Method method = TestCaseRound.class.getMethod("test", int.class, double.class);
tc.appendMethod(null, method, int0, double1);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverFloats method buildTestCaseExp.
private static DefaultTestCase buildTestCaseExp() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference double0 = tc.appendDoublePrimitive(Math.exp(Math.PI));
VariableReference double1 = tc.appendDoublePrimitive(Math.PI);
Method method = TestCaseExp.class.getMethod("test", double.class, double.class);
tc.appendMethod(null, method, double0, double1);
return tc.getDefaultTestCase();
}
Aggregations