[racket] tests/eli-tester feedback (Was: Racket unit testing)

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Feb 13 21:41:23 EST 2011

10 minutes ago, Stephen Bloch wrote:
> On Feb 13, 2011, at 7:59 PM, Eli Barzilay wrote:
> >> In any case, wouldn't
> >> 
> >> (test E /=> #f)
> >> 
> >> be even shorter and clearer?
> > 
> > I find `/=>' extremely confusing.  If it means a simple "does not
> > evaluate to", then what happens when E throws an error?
> There are two things "/=>" could mean: "does not evaluate to", or
> "evaluates to something other than".  I'd lean towards the latter,
> for the reason you point out.  But whichever, as long as it's
> documented.

It currently shoots for (and will continue in the future) a very low
readability overhead -- that's the whole reason for the infixish `=>'
syntax.  If you're willing to give this up then the problem doesn't
even exist because you can just enforce a second level of grouping
around each test.

To put this differently, I view tests as an important thing that lives
in the api neighborhood.  So anything that requires looking at the
documentation for casual readers is as bad as writing the manual in
hebrew and and handing out dictionaries.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.