<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2722.900" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>The Test Suite in DrScheme 2.03 looks really
nice!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I wanted to use it to test modules. Suppose I have
the following</FONT></DIV>
<DIV><FONT size=2>module foo</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> (module foo
mzscheme</FONT></DIV>
<DIV><FONT face=Arial size=2>
(provide (all-defined))</FONT></DIV>
<DIV><FONT face=Arial size=2>
(define (double x) (* 2 x)))</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT size=2>and want to test it with</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
call: (double 2)</FONT></DIV>
<DIV><FONT face=Arial size=2>
expected: 4</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT size=2>It looks like I need to create an intermediate
program</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> (require (file
"./foo.scm"))</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>and make the test cases against this testable program
(versus</FONT></DIV>
<DIV><FONT size=2>a module). Since require must be at the top
level I can't just</FONT></DIV>
<DIV><FONT size=2>write the call as</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> (begin</FONT></DIV>
<DIV><FONT size=2>
(require foo) ; error - not at top
level</FONT></DIV>
<DIV><FONT size=2>
(double 2))</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Is there an easier way to write a test suite for foo and
modules</FONT></DIV>
<DIV><FONT size=2>in general?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Would it make sense to add pre and post processing
to</FONT></DIV>
<DIV><FONT size=2>the test suite? In other words the (require foo)
could</FONT></DIV>
<DIV><FONT size=2>be included the pre processing. The pre and post
processing</FONT></DIV>
<DIV><FONT size=2>could be used to set up test jigs or structures that are used
in</FONT></DIV>
<DIV><FONT size=2>a multitude of the test cases.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>John</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV></BODY></HTML>