[racket] rackunit messages

From: Harry Spier (vasishtha.spier at gmail.com)
Date: Tue Nov 27 16:55:25 EST 2012

Thanks Danny.  I see that now.
Harry

On Tue, Nov 27, 2012 at 1:13 AM, Danny Yoo <dyoo at hashcollision.org> wrote:
>
>
>
> A test suite is a value, and you're seeing that value since it's a toplevel
> expression.  That is, nothing's being run.  You'll probably want to amend to
> something like this:
>
> ;;;;;;;;;;;;;;;;;;;;;;;
>
> (module+ main
>   (require rackunit rackunit/text-ui)
>   ;;make-byte-array tests
>   (define 2-3-0-barry (make-byte-array 2 3 ))
>   (define 2-3-λ-barry (make-byte-array 2 3 #o377))
>
>   (define my-test-suite
>     (test-suite
>      "Testing make-byte-array"
>      (check equal? (byte-array-string 2-3-0-barry) #"\0\0\0\0\0\0")
>      (check equal? (byte-array-string 2-3-λ-barry)
> #"\377\377\377\377\377\377")
>      (check equal? (byte-array-row-count 2-3-0-barry) 2)
>      (check equal? (byte-array-column-count 2-3-0-barry) 3)))
>
>   (run-tests my-test-suite))
>
> ;;;;;;;;;;;;;;;;;;;;;;;
>
>
> For more information, take a look near the end of
> http://docs.racket-lang.org/rackunit/quick-start.html, where the example
> organizes the checks into a "suite".
>
>
> Best of wishes!


Posted on the users mailing list.