README 1.9 KB

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