tests: Add test for integrate using decimal values

The `integrate` test is very slow when given polynomials as integrand
and integers as bounds, because it computes everything using large
fractions, and this is quite expensive. Add a test that does it with
decimals and runs much faster.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
Christophe de Dinechin 2024-01-22 23:56:46 +01:00
parent 85fbdd84c9
commit fc76ba4c5c

View file

@ -3195,7 +3195,13 @@ void tests::numerical_integration_testing()
.test(3, ENTER).expect("3")
.test("'sq(Z)+Z'", ENTER).expect("'Z²+Z'")
.test(F, ALPHA, Z, ENTER).expect("'Z'")
.test(SHIFT, KEY8, F2).wait(1500).expect("⁵³/₆");
.test(SHIFT, KEY8, F2).wait(2500).expect("⁵³/₆"); // REVISIT: So slow?
step("Integration with decimals")
.test(CLEAR, "2.", ENTER).expect("2.")
.test("3.", ENTER).expect("3.")
.test("'sq(Z)+Z'", ENTER).expect("'Z²+Z'")
.test(F, ALPHA, Z, ENTER).expect("'Z'")
.test(SHIFT, KEY8, F2).wait(250).expect("8.83333333333");
}