On Wed, Jun 08, 2022 at 07:50:26AM +0200, Ralf Hemmecke wrote:
> Hi Waldek,
>
> I've committed new testcases to my elt-universalsegment branch.
> Before I implement that, can you tell me whether you agree with the expected
> output?
>
> The tests for List and Vector are identical.
> Nearly so for finite streams, except that errors appear delayed.
> In the infinite stream case, it's like in the finite stream case except that
> there are less errors, because there is no upper bound for the index.
>
> https://github.com/hemmecke/fricas/blob/elt-universalsegment/src/input/eltunisegl.input
> https://github.com/hemmecke/fricas/blob/elt-universalsegment/src/input/eltunisegv.input
> https://github.com/hemmecke/fricas/blob/elt-universalsegment/src/input/eltunisegf.input
> https://github.com/hemmecke/fricas/blob/elt-universalsegment/src/input/eltunisegs.input
AFAICS the expected results are OK. However, the various tests
are quite repetitive. Since you are already playing with macros
one could make things shorter and IMO clearer by organizing
tests like:
common_tests ==>
-- list of test common to all cases
.....
testcaseNoClear("lists")
x := ...
common_tests where
TESTEQUALS(A, B) ==> testEquals("x(" A ")", B)
...
-- other tests
testcaseNoClear("vectors")
common_tests where
....
...
testcaseNoClear("infinite streams")
common_tests where
....
-- other tests
In stream case TESTLIBRARYERROR(A, B) probably should
expand to testLibraryError(entries complete x(" A ")"), that
is force computation.
Also, for better coverage we probably should have test like
this:
s := ...;
testEquals("s(3)", "42")
testLibrarryError("s(4)")
(this may require low enough setting for 'stream calculate').
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/20220609150352.GA14512%40fricas.math.uni.wroc.pl.