1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-05 03:30:24 +02:00
guile/test-suite
Andy Wingo e3b743dc72 Move source properties out to a module
* module/ice-9/source-properties.scm: New file, providing the
source-properties API, as well as a replacement for `read' that always
attaches source properties, regardless of the 'positions option on the
port.

* am/bootstrap.am (SOURCES): Add the new file.

* libguile/srcprop.c:
* libguile/srcprop.h: Remove.

* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(DOT_X_FILES):
(DOT_DOC_FILES):
(modinclude_HEADERS):
* libguile.h: Remove srcprop.h.

* libguile/deprecated.c:
* libguile/deprecated.h: Add deprecation shims for srcprop.h interface.

* libguile/backtrace.c:
* libguile/debug.c:
* libguile/eval.c:
* libguile/init.c:
* libguile/memoize.c:
* libguile/promises.c:
* libguile/read.c:
* libguile/syntax.c: Remove needless srcprop.h includes.

* module/ice-9/boot-9.scm: Reorder some definitions so that deprecated
modules can use the (system syntax internal) module.

* module/ice-9/deprecated.scm: Add shims for Scheme source-properties
interface.

* module/ice-9/read.scm (read): Never attach source properties.  Users
that want source can use read-syntax.

* module/language/cps.scm:
* module/language/cps/spec.scm:
* module/language/ecmascript/compile-tree-il.scm:
* module/language/elisp/compile-tree-il.scm:
* module/language/elisp/lexer.scm:
* module/language/elisp/parser.scm:
* module/language/tree-il.scm:
* module/language/tree-il/spec.scm:
* module/language/wisp.scm:
* module/system/base/lalr.scm:
* test-suite/tests/elisp-reader.test:
* test-suite/tests/reader.test:
* test-suite/tests/srcprop.test:
* test-suite/tests/srfi-105.test:
* test-suite/tests/srfi-119.test: Use the (ice-9 source-properties)
module to get access to source properties.
2025-05-12 16:29:04 +02:00
..
lalr remove duplicate when/unless definitions 2012-01-20 21:16:50 +01:00
standalone Rework test-smob-mark to use off-heap allocations 2025-04-23 15:17:44 +02:00
test-suite guile-test: support automake parallel test harness via --trs-file 2024-06-20 15:35:48 +02:00
tests Move source properties out to a module 2025-05-12 16:29:04 +02:00
ChangeLog-2008
driver Switch to the preferred parallel automake test harness 2024-06-20 15:35:48 +02:00
guile-test Add missing, read-only, and typical copy-file tests 2025-03-19 21:25:40 -05:00
Makefile.am Add ephemeron objects 2025-05-05 11:04:44 +02:00
README

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.