right += 0.3;
}
}
@Test
public void testSolutionBelowSide() {
UnivariateFunction f = new Sin();
UnivariateSolver solver = getSolver();
double left = -1.5;
double right = 0.05;
for(int i = 0; i < 10; i++) {
// Test whether the allowed solutions are taken into account.
double solution = getSolution(solver, 100, f, left, right, AllowedSolution.BELOW_SIDE);
if (!Double.isNaN(solution)) {
Assert.assertTrue(f.value(solution) <= 0.0);
}
// Prepare for next test.
left -= 0.1;
right += 0.3;