Next: srfi lightweight-testing spec, Previous: srfi lightweight-testing abstract, Up: srfi lightweight-testing [Index]
The mechanism defined in this SRFI should be available in every Scheme system because it has already proven useful for interactive development—-of SRFIs.
Although it is extremely straightforward, the origin of the particular mechanism described here is the examples.scm file accompanying the reference implementation of SRFI-42. The same mechanism has been reimplemented for the reference implementation of SRFI-67, and a simplified version is yet again found in the reference implementation of SRFI-77.
The mechanism in this SRFI does not replace more sophisticated approaches to unit testing, like SRFI-64 or SchemeUnit. These systems provide more control of the testing, separate the definition of a test, its execution, and its reports, and provide several other features.
Neil Van Dyke’s Testeez library is very close in spirit to this
SRFI. In Testeez, tests are disabled by (re–)defining a macro.
The advantage of this method is that the code for the test cases can be
removed entirely, and hence even the dependency on the Testeez library.
This SRFI on the other hand, uses a Scheme conditional (cond,
if)
to prevent execution of the testing code. This method is more
dynamic but retains dead testing code, unless a compiler and a module
system are used to apply constant folding and dead code elimination.
The only major addition in SRFI over Testeez is the comprehension
for formulating parametric tests.
Design considerations for this SRFI include the following:
=>
syntax is
widely used and intuitive.
Next: srfi lightweight-testing spec, Previous: srfi lightweight-testing abstract, Up: srfi lightweight-testing [Index]