[plt-scheme] testing modules
Although I consider this style of testing to be bogus for
real development it remains popular and several tools
exist: Neil van Dyke's testeez, and a recent SRFI by
Sebastien Egner come to mind. You can also easily do this
style of testing with SchemeUnit. For example:
(require (planet "test.ss" ("schematics" "schemeunit.plt"
2))
(planet "text-ui.ss" ("schematics"
"schemeunit.plt" 2)))
(define-syntax bogus-test
(syntax-rules ()
((bogus-test predicate expr1 expr2)
(test/text-ui
(test-case "" (check predicate expr1 expr2))))))
(bogus-test = 1 1)
(bogus-test < 2 1)
Improving the output is about 10 lines of code.
N.
--- Prabhakar Ragde <plragde at uwaterloo.ca> wrote:
> I want to introduce students to the basics of the PLT
> module system at a
> particular point in a course. They don't know about I/O
> yet. They've
> been writing tests in HtDP style. But, although
> expressions in a module
> are evaluated when run with the module language selected
> in DrScheme,
> their values are not reported. Is the best thing to do to
> put the tests
> in an auxiliary file which requires the new module? That
> seems a bit
> awkward. Is there something short of Schemeunit I should
> be telling them
> about? Thanks. --PR
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
Email: noelwelsh <at> yahoo <dot> com noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/ http://www.untyped.com/untyping/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com