On Jul 6, 2011, at 4:40 PM, Patrick King wrote: > I find myself doing stuff like... > > #lang racket > (require rackunit) > (provide my-function ...) > > ; My code > > (define (my-function ...) ...) ... > > ; My tests ... > > (check* ...) ... ; * in the wildcard sense > > ... so that I never evade testing my code. Does another developer end up > testing my code? A user? > In other words, if I don't export the test code via require, what gets > executed by importers? of source? of executables? > IMHO, even if the answer is "all of it", it's worth it, but the answer may > affect how tests are written.
Calling the 'check-*' functions perform a check. This means that these tests are run whenever the given module is 'require'd [*]. However, rackunit provides a fairly smooth "upgrade" path, in the sense that you can take a bunch of checks and wrap them in a "test suite" form that means that they'll only be run when requested. John Clements [*] There's no distinction between "requiring source" and "requiring executables"; using 'require' allows a module to use the things 'provide'd from that module.
smime.p7s
Description: S/MIME cryptographic signature
_________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

