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).

In my experience, the one compelling reason not to include unit tests in the 
same module is to trim the 'require' chain for modules that are included in the 
DrRacket startup.


John

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to