Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Tree [5c48b4] 5.29.0 / tests /
History



File Date Author Commit
wester_problems 2007-06-04 robert_dodier robert_dodier [ed863b] Commit test scripts written by Michael Wester, ...
.gitignore 2011-04-20 Andrej Vodopivec Andrej Vodopivec [fda809] renamed .cvsignore to .gitignore
Makefile.am 2012-12-03 robert_dodier robert_dodier [5c48b4] Put rtest_laplace.mac on list of files for dist...
README.how-to 2007-05-29 willisbl willisbl [001fa4] update to README.how-to
mcond_display_elseif.mac 2005-07-28 robert_dodier robert_dodier [d89c99] Modify display code so that if -- then -- elsei...
mcond_display_elseif.out 2005-07-28 robert_dodier robert_dodier [d89c99] Modify display code so that if -- then -- elsei...
rexamples.mac 2007-11-14 robert_dodier robert_dodier [a46b1c] Change name of quotient operator from "//" to "/".
rtest1.mac 2010-06-03 robert_dodier robert_dodier [c661c5] Let prederror=true in sort, so that the sort pr...
rtest10.mac 2012-06-01 robert_dodier robert_dodier [cdfe91] Apply continued fraction patch attached to bug ...
rtest11.mac 2011-03-27 robert_dodier robert_dodier [1d0650] Fix bug reported on mailing list 2011-03-25:
rtest12.mac 2007-05-23 willisbl willisbl [649507] make tests less dependent on ratsimp and evalua...
rtest13.mac 2010-10-12 crategus crategus [b332ce] Cutting out one example. It is moved to the fil...
rtest13s.mac 2007-05-23 willisbl willisbl [649507] make tests less dependent on ratsimp and evalua...
rtest14.mac 2012-03-02 Raymond Toy Raymond Toy [bd8a73] Make numerical value of bessel_i(n,%i*x) be pur...
rtest15.mac 2012-11-17 robert_dodier robert_dodier [5260d8] Revert c36715e95ed0: apparently there are some ...
rtest16.mac 2012-11-25 Dan Gildea Dan Gildea [5ad2bf] Fix #2504 wrong answer for simple limit, limit(...
rtest1a.mac 2007-05-15 willisbl willisbl [734dcb] o Make tests less dependent on ratsimp and eval...
rtest2.mac 2012-01-11 robert_dodier robert_dodier [8455fc] Rename special varibles LB and RB (left and rig...
rtest3.mac 2011-08-14 crategus crategus [f1755d] Saving the value of the option variable display2d
rtest4.mac 2008-06-02 dgildea dgildea [c7f90e] src/nrat4.lisp:
rtest5.mac 2011-11-12 crategus crategus [cef192] Adding examples for the function depends.
rtest6.mac 2004-11-14 amundson amundson [0b0bdd] Tests, demos and eigen.mac downcased. All tests...
rtest6a.mac 2009-11-01 crategus crategus [e01df6] Cutting out two tests for the function specint,...
rtest6b.mac 2007-05-15 willisbl willisbl [ca68de] o Make tests less dependent on ratsimp and eval...
rtest7.mac 2008-07-12 willisbl willisbl [e906d5] append regression test for SF bug 2014436
rtest8.mac 2010-10-06 rtoy rtoy [0c4941] Be careful about binding $numer to T when deali...
rtest9.mac 2010-02-20 crategus crategus [a37f2b] Updating two examples which work after revision...
rtest9a.mac 2009-06-23 crategus crategus [470fcd] Modifying the results of 11 examplesd because o...
rtest_abs.mac 2010-10-06 willisbl willisbl [232d3e] o change simpabs to use simpcheck instead of si...
rtest_algebraic.mac 2008-07-05 willisbl willisbl [76a33d] append new rtest file: rtest_algebraic, modify ...
rtest_allnummod.mac 2010-10-10 crategus crategus [2289e8] Because of revision 1.15 of maxmin.lisp:
rtest_ask.mac 2009-10-17 billingd billingd [3d5a66] Bug 2876387: ode2 asks if sqrt(3) is an integer
rtest_boolean.mac 2008-01-21 robert_dodier robert_dodier [9203d7] Throw in a couple of tests for SF bug [ 1726148...
rtest_carg.mac 2010-08-22 crategus crategus [7aa150] Adding a testfile for the function carg.
rtest_diff_invtrig.mac 2006-02-21 robert_dodier robert_dodier [6568bb] Modified rtest_trig.mac to collect some express...
rtest_dot.mac 2007-08-09 rtoy rtoy [cd640b] src/float.lisp:
rtest_elliptic.mac 2011-11-19 Raymond Toy Raymond Toy [f259b3] Tell maxima about periodic properties of ellipt...
rtest_equal.mac 2009-09-29 willisbl willisbl [6c6bb0] o additional tests for rtest_equal (SF bug 2869...
rtest_everysome.mac 2006-02-21 robert_dodier robert_dodier [6568bb] Modified rtest_trig.mac to collect some express...
rtest_expintegral.mac 2012-07-27 Dan Gildea Dan Gildea [60d507] relax precision of tests of expintegral_e
rtest_gamma.mac 2012-12-03 robert_dodier robert_dodier [8f1085] Work around bugs in COMPLEX-ERF. Bug #1: sqrt(z...
rtest_hypgeo.mac 2010-09-28 willisbl willisbl [9b3cb7] o chages for updated simpabs
rtest_integrate.mac 2012-11-25 Dan Gildea Dan Gildea [76d86d] Make intgreat transitive.
rtest_integrate_special.mac 2011-07-31 crategus crategus [7d62e1] Updating examples ind some test files because o...
rtest_lambert_w.mac 2012-08-25 David Billinghurst David Billinghurst [7a55f2] Fix Lisp error for "lambert_w(1), numer;" and a...
rtest_lapack.mac 2007-01-12 rtoy rtoy [f28dcc] Test script for LAPACK.
rtest_laplace.mac 2012-11-26 robert_dodier robert_dodier [ffa3ab] Still more tests for laplace.
rtest_log.mac 2012-11-25 Dan Gildea Dan Gildea [76d86d] Make intgreat transitive.
rtest_map.mac 2007-05-20 willisbl willisbl [7d4135] append rtest_map & modify Makefile.am and tests...
rtest_mset.mac 2012-07-25 robert_dodier robert_dodier [5e7e99] Allow nested lists in left-hand side of assignm...
rtest_numth.mac 2012-12-01 Volker van Nek Volker van Nek [b832fc] renaming some GF functions
rtest_plot.mac 2012-01-29 robert_dodier robert_dodier [bb0b0f] Allow 3-d parametric plots. Thanks to Alexander...
rtest_power.mac 2011-07-31 crategus crategus [3f8df8] New test file rtest_power.mac
rtest_round.mac 2008-01-10 willisbl willisbl [93e7ae] Append regression tests for SF bug 1867942.
rtest_rules.mac 2012-11-30 robert_dodier robert_dodier [90b66b] Fix a couple of bugs in pattern matcher.
rtest_scalarp.mac 2007-05-29 macrakis macrakis [6af9d1] Correct test 18 -- must have committed wrong ve...
rtest_sign.mac 2012-05-08 Dan Gildea Dan Gildea [2009f7] Fix inequality facts being forgotten
rtest_signum.mac 2010-10-06 willisbl willisbl [232d3e] o change simpabs to use simpcheck instead of si...
rtest_sqrt.mac 2011-07-31 crategus crategus [7d62e1] Updating examples ind some test files because o...
rtest_taylor.mac 2010-05-30 crategus crategus [d907ee] Adding examples related to the bug reports:
rtest_tex.mac 2008-07-23 robert_dodier robert_dodier [63a836] Process plus or minus argument in tex-ification...
rtest_tmlinsolve.mac 2012-09-20 robert_dodier robert_dodier [a4971c] (1) Nuke obsolete compatibility macro STORE and...
rtest_translator.mac 2010-07-31 robert_dodier robert_dodier [cb3606] Various changes in translator to resolve SF bug...
rtest_trig.mac 2012-07-22 Raymond Toy Raymond Toy [2bab50] Simplify numerical testing of trig identities b...
rtest_zeta.mac 2010-02-06 crategus crategus [4991ce] Updating some examples and adding examples for ...
rtestconjugate.mac 2009-10-26 crategus crategus [93c7b9] Adding an example for conjugate(atan2(y,x))
rtestdefstruct.mac 2011-10-09 robert_dodier robert_dodier [9c220e] Share clean-up: move rtestdefstruct.mac into ma...
rtesthyp.mac 2012-11-10 Raymond Toy Raymond Toy [b5805d] Work around bug 3578373: hgfred([-1/2,a+1],[a+2...
rtestifactor.mac 2008-09-13 andrejv andrejv [e7e439] Test for ifactors(1).
rtestint.mac 2012-07-29 Dan Gildea Dan Gildea [5d98db] Fix Error integrating exp(-x)*sinh(sqrt(x)) wit...
rtestlabels.mac 2007-10-15 robert_dodier robert_dodier [d0cbaf] Call stringp instead of ?mstringp, now that Max...
rtestmcond_display.mac 2007-06-05 robert_dodier robert_dodier [85b796] Replace tabs embedded in strings with spaces
rtestmt19937.mac 2005-03-13 robert_dodier robert_dodier [32276c] MT19937 random number generator, adapted from C...
rtestnset.mac 2011-11-23 Barton Willis Barton Willis [d55421] o check that union is nary.
rtestode.mac 2011-01-01 crategus crategus [1d88ce] Adjusting one example because of revision 1.125...
rtestode_zp.mac 2005-04-04 amundson amundson [23c774] kill(allbut(props)) -> kill(all)
rtestparser_continuations_cr.mac 2005-11-10 robert_dodier robert_dodier [5fee8d] Changes to make backslash a line continuation c...
rtestparser_continuations_crnl.mac 2005-11-10 robert_dodier robert_dodier [5fee8d] Changes to make backslash a line continuation c...
rtestparser_continuations_nl.mac 2005-11-10 robert_dodier robert_dodier [5fee8d] Changes to make backslash a line continuation c...
rtestsum.mac 2010-03-20 crategus crategus [cddd0a] Correcting a typo. It is revision 1.43 and not ...
testsuite.lisp 2012-12-01 robert_dodier robert_dodier [13968c] Tests 103 and 104 in rtesthyp now pass so remov...

Read Me

Suggestions and tips for writing test files
Barton Willis

(1) test file contains pairs of expressions. The first
expression is the input, and the second is the expected output; for
example, here are two tests:

x + 0;
x$

x - x;
0$

You may terminate each line with either a semicolon or a dollar
sign. To keep the file somewhat organized, terminate the input line
with a semicolon and the expected output with a dollar sign. It's helpful to
separate each input / expected output pair with a blank line.

(2) Name your file "rtest_<a word that describes its contents>.mac".
For example, "rtest_abs.mac" is a good name for tests for the absolute 
value function.

(3) If the input is something that doesn't need to be checked, make a
compound statement with the last statement being 0. Thus

(assume(x > 0), 0);
0$

abs(x);
x$

(4) If a test needs to use a non-default value for an option variable, try to
make the change local instead of global. For example

is (x < 1), prederror : false;
unknown$

Doing so keeps your test from modifying the global environment.

(5) The first line of the test file should be 

(kill(all),0);
0$

(6) From a Maxima input prompt, use the 'batch' function to run your test:

     (%i1) batch("rtest_abs.mac", 'test);
     Error log on #<output stream rtest_abs.ERR>

You may need to give Maxima a full pathname to the file. After the
test finishes, you can look at the .ERR file to see which tests
failed.

(7) If your test defines functions, makes assumptions, or assigns
values to symbols, the last few lines of your test should clean up the
global environment; thus if your test does assume(x > 0), assigns a
value to 'a', and defines a function 'f', the last line of your test
should be something like

(forget(x > 0), remvalue(a), remfunction(f),0);
0$

(8) To append a test file to the main Maxima test suite,
you'll need to append the file name to the list in the file
/tests/testsuite.lisp. If your test has known errors, you'll need to
include this data into testsuite.lisp. To illustrate, the tests
42 and 42 in rtest_abs are known bugs. To tell Maxima that these
are known bugs, append ((mlist) "rtest_abs" 42 43) to the file 
list in testsuite.lisp.

Also, you'll need to append the name of the test file to
makefile.am. Finally, build Maxima and run the test suite. If all goes
well, commit the new test file.

(9) Other:

(a) Check that your test runs multiple times without error. After
appending a new test to Maxima's test suite, make sure that run_testsuite() 
runs multiple times without error.

(b) Always test the simple cases: abs(0), abs(0.0), abs(0.0b0), ... Also,
check that functions work correctly for CRE expressions, arguments that
contain '%i', empty lists, empty matrices, ... Thus always test
the 'boundary' cases; these are things like max(), min(), apply("*",[]), ....

(c) Check the sourceforge bug list for all reported bugs for the functions(s)
you are testing. Include tests for these bugs; also put a comment in your
test file that references the bug report:

/*  See SF Bug #  771061 */

expand((vt . a^^(-1) . u+1)^^(-2));
((vt.a^^(-1).u)^^2+2*(vt.a^^(-1).u)+1)^^(-1)$

If a bug causes a fatal error, you'll need to exclude it from your test
(or better, include it, but comment it out).

(d) It might be easier to place all known failures at the top of the
file. With this policy, you can append new tests without updating the
list of known failures in testsuite.lisp.

(e) If a test checks a not so well known identity, include a reference to the
identity:

/* A&S 13.6.1 */
hgfred([v+1/2],[2*v+1],2*%i*z);
4^(v/2)*bessel_j(v,z)*gamma(v+1)*exp(%i*z)/z^v$

(f) Maxima evaluates the input, but only simplifies the expected output. Thus
a test such as

  makelist(sin(k * %pi),k,1,5);
  makelist(0,k,1,5)$

will fail. You'll need to write the test as either 

  makelist(sin(k * %pi),k,1,5);
  ''(makelist(0,k,1,5))$

or 

  makelist(sin(k * %pi),k,1,5);
  [0,0,0,0,0]$

To get a test to pass,you may need to insert a few parenthesis in the 
expected output; for example

  -a/2;
  -(a/2)$

Another way to handle such things is to use explicit calls to ratsimp:

  ratsimp(-a/2);
  ''(ratsimp(-a/2))$

To test a function such as factor, you do not want to apply ratsimp.