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

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Tue Feb 15 09:26:46 EST 2011

On 2/15/11 7:02 AM, Eli Barzilay wrote:
> 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))

You could allow the arrow-less form (which I like) but require it to 
produce #t and only #t.  This accommodates your examples while catching 
things like:

    (test (fact 5) 121)

David


Posted on the users mailing list.