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

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Feb 15 07:02:08 EST 2011

Three hours ago, Hendrik Boom wrote:
> On Mon, Feb 14, 2011 at 04:43:24PM -0600, Robby Findler wrote:
> > I guess I'm asking if true is bound somewhere or not.
> 
> It almost looks as if you want predicates on the right side of =>'

Yes -- the whole point of the simple arrow-less version is to make
using predicates very easy.  For example, instead of some

1. (test E1 =satisfies> even?
         E2 =satisfies> (lambda (x) (> x 50)))

you'd write

2. (test (even? E1)
         (> E2 50))

It's probably good to compare this to the suggestions in this threads
for the arrow-less version:

3. (test (and (even? E1) #t) => #t
         (and (> E2 50) #t)  => #t)

IMO, (2) gains much readability over (1), and (3) loses most of that.

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


Posted on the users mailing list.