[racket] running test-suites in module+ tests

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sat Aug 24 22:47:25 EDT 2013

Does this help: 

> #lang racket
> 
> (module+ test 
>   (require rackunit))
> 
> ;; --- 
> 
> (module+ test
>   (define-test-suite for-f
>     (check-equal? (f 10) 10)
>     (check-equal? (f 11) 12)))
> 
> (define (f x)
>   x)
> 
> 
> (module+ test
>   (require rackunit/text-ui)
>   (run-tests for-f))



On Aug 24, 2013, at 10:39 PM, Chad Albers wrote:

> Hi,
> 
> I'm exploring rolling my tests into the source files they cover using
> the (module+ test...) form.
> 
> Can I include (test-suite ...) statements in the module, and if so,
> how do I get it to work?  I've haven't managed to get it to work with
> raco test.
> 
> Thanks,
> --
> Chad
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users


Posted on the users mailing list.