[racket] Price of RackUnit

From: Ryan Culpepper (ryan at cs.utah.edu)
Date: Wed Jul 6 21:59:04 EDT 2011

On 07/06/2011 07:13 PM, John Clements wrote:
>
> On Jul 6, 2011, at 6:01 PM, Neil Van Dyke wrote:
>
>> For the example module you gave, I believe that any time that
>> module is loaded by "require" or similar, those tests will be
>> evaluated.
>>
>> There is a recent discussion thread that's relevant to wanting to
>> embed tests in modules this way:
>> http://lists.racket-lang.org/dev/archive/2011-June/006815.html
>>
>> For now, I think that the preferred place for tests is in separate
>> modules that "require" the module to be tested.  I think that is
>> the friendliest thing for PLaneT modules, at least, since we like
>> reusable modules to load quickly, and unit testing at each load
>> time is overkill for almost every application.
>
> But then you have to 'provide' everything you want to test. I think
> the test suite solution is much cleaner, or possibly whatever
> Jay/Eli/Matthias/Ryan/etc. come up with (this is a topic of fairly
> current discussion).

You can use 'require/expose' to extract unexported functions, etc (but 
not macros) for testing.

Ryan


Posted on the users mailing list.