[racket] inline unit tests

From: David Janke (david at thejamesriver.com)
Date: Wed Jun 6 11:14:39 EDT 2012

Maybe something similar to Microsoft's #region directive (
http://msdn.microsoft.com/en-us/library/9a1ybwek(v=vs.71).aspx). It
wouldn't need much intelligence, but you would have to manually define each
block

(define fish '(1 2))
;; region Tests
(module+ test (check andmap number? fish))
;; endregion

(define (feed n) (+ n 1))
;; region Tests
(module+ test (check-equal? 3 (feed 2)))
(module+ test (check-equal? 0 (feed -1)))
;; endregion




On Wed, Jun 6, 2012 at 1:45 AM, Laurent <laurent.orseau at gmail.com> wrote:

> One feature that could be helpful here is code folding. DrRacket could
> then propose different "views" of one source file (e.g., code only,
> code+tests, tests only, etc.).
> Not sure how to do it though.
>
> Laurent
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120606/5438c78d/attachment.html>

Posted on the users mailing list.