1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00
guile/test-suite
Dirk Herrmann cc56ba8062 * libguile/eval.c (s_missing_expression, s_bad_variable): New static
identifiers.

	(scm_m_define): Use ASSERT_SYNTAX to signal syntax errors.  Prefer
	R5RS terminology for the naming of variables.  Be more specific
	about the kind of error that was detected.  Make sure file name,
	line number etc. are added to all freshly created expressions.
	Avoid unnecessary consing when creating the memoized code.

	* test-suite/tests/syntax.test (exception:missing-expr,
	exception:extra-expr): New.

	Adapted tests for 'begin' to the new way of error
	reporting.
2003-10-11 16:03:29 +00:00
..
standalone 2003-05-29 Stefan Jahn <stefan@lkcc.org> 2003-05-29 14:39:13 +00:00
tests * libguile/eval.c (s_missing_expression, s_bad_variable): New static 2003-10-11 16:03:29 +00:00
.cvsignore * Removed texinfo.tex - it is supplied by Automake. 2001-08-24 11:06:33 +00:00
ChangeLog * libguile/eval.c (s_missing_expression, s_bad_variable): New static 2003-10-11 16:03:29 +00:00
COPYING Copyleft files. 1999-05-30 09:22:12 +00:00
guile-test * guile-test: Wrapped in module (test-suite guile-test). 2003-09-22 19:00:41 +00:00
lib.scm * libguile/eval.c (s_bad_expression, syntax_error_key, syntax_error, 2003-10-10 21:49:27 +00:00
Makefile.am * tests/poe.test: New file. 2003-10-08 23:05:12 +00:00
README * Added Thien-Thi Nguyen's patch to support "make check". 2001-01-26 13:44:57 +00:00

This directory contains some tests for Guile, and some generic test
support code.

To run these tests, you will need a version of Guile more recent than
15 Feb 1999 --- the tests use the (ice-9 and-let*) and (ice-9
getopt-long) modules, which were added to Guile around then.

For information about how to run the test suite, read the usage
instructions in the comments at the top of the guile-test script.

You can reference the file `lib.scm' from your own code as the module
(test-suite lib); it also has comments at the top and before each
function explaining what's going on.

Please write more Guile tests, and send them to bug-guile@gnu.org.
We'll merge them into the distribution.  All test suites must be
licensed for our use under the GPL, but I don't think I'm going to
collect assignment papers for them.



Some test suite philosophy:

GDB has an extensive test suite --- around 6300 tests.  Every time the
test suite catches a bug, it's great.

GDB is so complicated that folks are often unable to get a solid
understanding of the code before making a change --- we just don't
have time.  You'll see people say things like, "Here's a fix for X; it
doesn't cause any regressions."  The subtext is, I made a change that
looks reasonable, and the test suite didn't complain, so it must be
okay.

I think this is terrible, because it suggests that the writer is using
the test suite as a substitute for having a rock-solid explanation of
why their changes are correct.  The problem is that any test suite is
woefully incomplete.  Diligent reasoning about code can catch corner
conditions or limitations that no test suite will ever find.



Jim's rule for test suites:

Every test suite failure should be a complete, mysterious surprise,
never a possibility you were prepared for.  Any other attitude
indicates that you're using the test suite as a crutch, which you need
only because your understanding is weak.