[racket] testing in P4P

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Sun Sep 19 21:15:00 EDT 2010

On 9/19/10 8:45 PM, Shriram Krishnamurthi wrote:
> I've added a construct equivalent to check-expect:
>
>    test:<expr>  =?<expr>
>
> is equivalent to
>
>    (check-expect<expr>  <expr>)
>
> You can see examples.rkt rewritten to use it almost everywhere.

I like this experiment.  Two quick remarks:

- I wish conditionals were lighter weight.
   Maybe cond: Q0, A0, ... else: An

- I wish it were easier to predict names and syntax for special forms.

I would have guessed

check-expect: e0 e1
or
check-expect: e0, e1

Choices of names seem independent of surface syntax details, so why 
should they change if we change those details?

And doesn't the use of `=' and `=?' keywords violate your 
"Distinguishing Keywords" choice?  I would expect `=:' and `=?:' for 
consistency.

David


Posted on the users mailing list.