[racket] variables within macros
On Jan 20, 2013, at 6:37 AM, Tim Brown wrote:
>> On 01/19/2013 06:31 PM, Matthias Felleisen wrote:
> [quoting depth out by one]
>>> On Jan 18, 2013, at 12:36 PM, Tim Brown wrote:
>>> Here is one way to justify this answer. You really may wish to
>>> make define/test orthogonal to which testing framework you use:
>>> -- rackunit
>>> -- test engine
>>> -- the Eli tester
>
> Which is the recommended testing framework for Racket. In this example
> we want to keep ourselves separated from a particular framework... but
> practically, which should we be using.
Of the above, I use
rackunit for my projects
and
test engine for the teaching languages
Eli's testing library is in some state of development. Some dev
people are using it. Realistically rackunit is most widely used
and has the most comprehensive support (docs, test suite, gui
support if you like that).
It is impossible to parameterize over these testing frameworks
because they are provided as modules (simple libraries) not units
(parameterizable libraries). Plus their syntactic extensions are
somewhat incompatible.
What you can do is hide the specific choice in your own testing
library by designing your own test specification language and
expanding the tests into your favorite testing framework, e.g.,
(define/test (f x ...)
(test (lhs = rhs) ...)
e ...)
and expand this to
... (check-equal? lhs rhs) ..
-- Matthias