Commit | Line | Data |
---|---|---|
000ee07f JB |
1 | This directory contains some tests for Guile, and some generic test |
2 | support code. | |
3 | ||
216aef15 JB |
4 | To run these tests, you will need a version of Guile more recent than |
5 | 15 Feb 1999 --- the tests use the (ice-9 and-let*) and (ice-9 | |
6 | getopt-long) modules, which were added to Guile around then. | |
7 | ||
1ff7abbe DH |
8 | For information about how to run the test suite, read the usage |
9 | instructions in the comments at the top of the guile-test script. | |
000ee07f JB |
10 | |
11 | You can reference the file `lib.scm' from your own code as the module | |
12 | (test-suite lib); it also has comments at the top and before each | |
13 | function explaining what's going on. | |
14 | ||
15 | Please write more Guile tests, and send them to bug-guile@gnu.org. | |
cbea802b NJ |
16 | (Note that you must be subscribed to this list first, in order to |
17 | successfully send a report to it.) We'll merge them into the | |
18 | distribution. All test suites must be licensed for our use under the | |
19 | GPL, but I don't think I'm going to collect assignment papers for | |
20 | them. | |
70b83fe2 JB |
21 | |
22 | ||
23 | ||
24 | Some test suite philosophy: | |
25 | ||
26 | GDB has an extensive test suite --- around 6300 tests. Every time the | |
27 | test suite catches a bug, it's great. | |
28 | ||
29 | GDB is so complicated that folks are often unable to get a solid | |
30 | understanding of the code before making a change --- we just don't | |
31 | have time. You'll see people say things like, "Here's a fix for X; it | |
32 | doesn't cause any regressions." The subtext is, I made a change that | |
33 | looks reasonable, and the test suite didn't complain, so it must be | |
34 | okay. | |
35 | ||
36 | I think this is terrible, because it suggests that the writer is using | |
37 | the test suite as a substitute for having a rock-solid explanation of | |
b159fc3c JB |
38 | why their changes are correct. The problem is that any test suite is |
39 | woefully incomplete. Diligent reasoning about code can catch corner | |
40 | conditions or limitations that no test suite will ever find. | |
41 | ||
70b83fe2 JB |
42 | |
43 | ||
44 | Jim's rule for test suites: | |
45 | ||
46 | Every test suite failure should be a complete, mysterious surprise, | |
47 | never a possibility you were prepared for. Any other attitude | |
48 | indicates that you're using the test suite as a crutch, which you need | |
49 | only because your understanding is weak. |