[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Integrating unit tests into source code

From: felix winkelmann
Subject: [Chicken-users] Integrating unit tests into source code
Date: Thu, 14 Dec 2006 10:51:46 +0100


While reading a bit about "doctest" (the Python utility), I thought
it would be relatively easy to support embedded documentation
in definitions, like:

(define (foo ...)
 '(test (...))

The basic idea is to extend the idea of Lisp/Scheme docstrings
(a string as the first form inside a procedure, when the body
has more than one expression) to doc-sexprs.
So one could embed test-cases directly in the code, in a backwards-
and R5RS-compatible way.

It's no big deal to extend the compiler to extract this info. What I'm
looking for is ideas about the exact mechanism, the syntax, etc.

Pointless or useful?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]