mirror of
https://gitlab.com/c3d/db48x.git
synced 2024-09-29 05:36:58 +02:00
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:
parent
85fbdd84c9
commit
fc76ba4c5c
1 changed files with 7 additions and 1 deletions
|
@ -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.83333 33333 3");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue