Re: [racket] Unit Testing Best Practice in Racket

2012-05-04 Thread Eli Barzilay
8 hours ago, Matthias Felleisen wrote: > > On Apr 30, 2012, at 7:05 PM, Eli Barzilay wrote: > > > 3. If you use nightly builds, you can put the test code in a > > sub-module: > > > > #lang racket > > ... > > (module+ test (require rackunit)) > > ... > > (module+ test ...tes

Re: [racket] Unit Testing Best Practice in Racket

2012-05-04 Thread Eli Barzilay
Just now, Matthias Felleisen wrote: > > On Apr 30, 2012, at 7:05 PM, Eli Barzilay wrote: > > > #lang racket > > ... > > (module+ test (require rackunit)) > > ... > > (module+ test ...test code here...) > > ... > > I have added this sketch to the Style guide, replacing my

Re: [racket] Unit Testing Best Practice in Racket

2012-05-04 Thread Matthias Felleisen
On Apr 30, 2012, at 7:05 PM, Eli Barzilay wrote: > > 3. If you use nightly builds, you can put the test code in a > sub-module: > > #lang racket > ... > (module+ test (require rackunit)) > ... > (module+ test ...test code here...) > ... > > The `test' submodule (whi

Re: [racket] Unit Testing Best Practice in Racket

2012-05-01 Thread Matthias Felleisen
Do try the DrRacket head in git. See #3 below. You can have your cake and eat it. Personally: Use rackunit to (define/provide-test-suite --test1 ... uses internal functions ...) in "main.rkt" Import into a file Tests/main.rkt, run with run-test-suite Always have both file

Re: [racket] Unit Testing Best Practice in Racket

2012-05-01 Thread Chad Albers
Thanks for the great suggestions. I agree that I should really be testing the public interface rather than the implementation. As a Racket n00b, I write small functions to compose the larger public facing functions, so testing these smaller/private functions prevents me for going off track. Than

Re: [racket] Unit Testing Best Practice in Racket

2012-04-30 Thread Eli Barzilay
20 minutes ago, Chad Albers wrote: > Hi, > > As a Ruby dev, I really like unit testing.  I've been using RackUnit > to suits my needs.  I was wondering, though, about how people go > about writing their tests for Racket.  Many of the functions that I > write will not be part of the public API that

Re: [racket] Unit Testing Best Practice in Racket

2012-04-30 Thread Neil Van Dyke
Chad Albers wrote at 04/30/2012 06:38 PM: Is there a way to run unit test against these 'private functions', without making them public via a (provide) You want the submodules support that is scheduled for release in Racket 5.4 in August. You can start using submodules now in the nightly buil