Tree [49e46e] branch-5_30 / 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 2013-03-08 robert_dodier robert_dodier [63785f] Merge branch 'master' of ssh://git.code.sf.net/...
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 2013-01-06 robert_dodier robert_dodier [e6a8e9] Bind *READ-BASE* to 10. when loading files (bot...
rtest10.mac 2012-06-02 Raymond Toy Raymond Toy [236c74] Merge branch 'master' of ssh://maxima.git.sourc...
rtest11.mac 2012-12-17 robert_dodier robert_dodier [dd299c] Fix bug in function PARTITION: test expressions...
rtest12.mac 2012-12-24 robert_dodier robert_dodier [e703a5] In letsimp and friends, strip debugging stuff f...
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 2013-03-22 robert_dodier robert_dodier [264b87] Merge branch 'master' of ssh://git.code.sf.net/...
rtest1a.mac 2013-01-04 robert_dodier robert_dodier [c26dcb] Special variable clean-up: remove unneeded spec...
rtest2.mac 2012-12-29 robert_dodier robert_dodier [d7ced4] Rename 'invert' to 'invert_by_adjoint', and cre...
rtest3.mac 2012-12-28 robert_dodier robert_dodier [4a3b2e] Fix bug in ORDFNA: CRE are not handled correctly.
rtest4.mac 2008-06-02 dgildea dgildea [c7f90e] src/nrat4.lisp:
rtest5.mac 2011-11-12 Douglas Crosher Douglas Crosher [cfca08] Merge branch 'master' of ssh://maxima.git.sourc...
rtest6.mac 2013-03-22 robert_dodier robert_dodier [264b87] Merge branch 'master' of ssh://git.code.sf.net/...
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 2013-04-02 Rupert Swarbrick Rupert Swarbrick [580ec6] Make failing test easier to run by hand.
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 2012-12-27 robert_dodier robert_dodier [a87a00] In ALIKE1, if both arguments are CRE, punt back...
rtest_everysome.mac 2006-02-21 robert_dodier robert_dodier [6568bb] Modified rtest_trig.mac to collect some express...
rtest_expintegral.mac 2012-07-29 robert_dodier robert_dodier [b80259] Merge branch 'master' of ssh://maxima.git.sourc...
rtest_gamma.mac 2013-02-22 Rupert Swarbrick Rupert Swarbrick [0af1f1] Tighten up noun form test for gamma_incomplete_...
rtest_hypgeo.mac 2010-09-28 willisbl willisbl [9b3cb7] o chages for updated simpabs
rtest_integrate.mac 2012-11-26 robert_dodier robert_dodier [8799ff] Merge branch 'master' of ssh://git.code.sf.net/...
rtest_integrate_special.mac 2011-10-16 Raymond Toy Raymond Toy [cd72ad] Merge branch 'master' of ssh://maxima.git.sourc...
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-26 robert_dodier robert_dodier [8799ff] Merge branch 'master' of ssh://git.code.sf.net/...
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 2013-03-22 robert_dodier robert_dodier [264b87] Merge branch 'master' of ssh://git.code.sf.net/...
rtest_plot.mac 2013-03-22 robert_dodier robert_dodier [264b87] Merge branch 'master' of ssh://git.code.sf.net/...
rtest_power.mac 2011-10-16 Raymond Toy Raymond Toy [cd72ad] Merge branch 'master' of ssh://maxima.git.sourc...
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 2013-03-22 robert_dodier robert_dodier [264b87] Merge branch 'master' of ssh://git.code.sf.net/...
rtest_signum.mac 2010-10-06 willisbl willisbl [232d3e] o change simpabs to use simpcheck instead of si...
rtest_sqrt.mac 2011-10-16 Raymond Toy Raymond Toy [cd72ad] Merge branch 'master' of ssh://maxima.git.sourc...
rtest_taylor.mac 2010-05-30 crategus crategus [d907ee] Adding examples related to the bug reports:
rtest_tex.mac 2012-12-31 robert_dodier robert_dodier [fc4faf] Additional examples to test some TeX functions ...
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-25 robert_dodier robert_dodier [825d36] Merge branch 'master' of ssh://maxima.git.sourc...
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 2012-02-26 robert_dodier robert_dodier [4e2e7f] Merge branch 'share-cleanup-branch-2011-10'
rtesthyp.mac 2012-11-11 robert_dodier robert_dodier [a899b9] Merge branch 'master' of ssh://maxima.git.sourc...
rtestifactor.mac 2008-09-13 andrejv andrejv [e7e439] Test for ifactors(1).
rtestint.mac 2012-12-08 robert_dodier robert_dodier [711652] Merge branch 'master' of ssh://git.code.sf.net/...
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 ...
test_readbase_lisp.lisp 2013-01-06 robert_dodier robert_dodier [3fd957] Files to test *READ-BASE*.
test_readbase_lisp_autoload.lisp 2013-01-06 robert_dodier robert_dodier [3fd957] Files to test *READ-BASE*.
test_readbase_maxima.mac 2013-01-06 robert_dodier robert_dodier [3fd957] Files to test *READ-BASE*.
test_readbase_maxima_autoload.mac 2013-01-06 robert_dodier robert_dodier [3fd957] Files to test *READ-BASE*.
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.