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

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Sun Feb 13 13:35:48 EST 2011

On Feb 13, 2011, at 12:16 PM, Eli Barzilay wrote:

>>> the `=>' is going to be required
> -or- there's a single expression to test for a non-#f result, and
> you'll use a nested `test' expression for those non-#f things.  This
> still makes things less convenient for using random predicates, but
> not much.  For example, a `fib' test suite that can currently look
> like this:
>
>   (test (exact-nonnegative-integer? (fib 10))
>         (fib 10) => 55)
>
> would instead be written as:
>
>   (test (test (exact-nonnegative-integer? (fib 10)))
>         (fib 10) => 55)

How is this an improvement on
(test (exact-nonnegative-integer? (fib 10)) => #t
         (fib 10) => 55)
which doesn't require any special cases at all?


Stephen Bloch
sbloch at adelphi.edu



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110213/5bfd6a52/attachment.html>

Posted on the users mailing list.