[plt-scheme] How to organize automated tests

From: Luciano Ramalho (luciano at ramalho.org)
Date: Mon May 25 19:05:35 EDT 2009

Hello, I am an experienced Python programmer just learning Scheme
while take a Programming Languages class using Prof. Krishnamurthi's
book, "Programming Languages: Application and Interpretation".

I'm using the PLAI Scheme extensions, which include a testing framework.

I'd like to separate my tests from the main code I'm working on, but
I've not found a good way to do it.

What I'd like to have is two files, the main source code, say
"myapp.scm" and tests in "myapp-tests.scm".

I don't want any reference to tests in myapp.scm, so myapp-tests.scm
starts with (include "myapp.scm"), and goes on to define and run the

This works, but there is a major nuisance: because DrScheme magically
add that #reader line to any file it saves, I am forced to edit
myapp.scm in an external editor, otherwise the #reader line generates
an error when I do the include: "module: illegal use (not at

I am sure there's a better way of organizing my source code and tests.
Can you point me in the right direction, perhaps recommend some
documentation or suggest a better way arrange my code in DrScheme?

Thanks for creating such a great learning environment!



Posted on the users mailing list.