[racket] rackunit messages

From: Harry Spier (vasishtha.spier at gmail.com)
Date: Mon Nov 26 23:45:38 EST 2012

I'm using rackunit for the first time.  In the code below (simulating
a 2-dimensional byte array by a structure with a byte-string) passes
the tests but I get these messages.
Can someone tell me what the messages in the interactions window are all about.

DEFINITIONS WINDOW
--------------------------------------
#lang racket
(struct byte-array (row-count
                           column-count
                           string))


(provide (contract-out [make-byte-array
                        (case->
                         (natural-number/c natural-number/c          .
-> . byte-array?)
                         (natural-number/c natural-number/c byte? . ->
. byte-array?))]))
(define make-byte-array
  (case-lambda
               [(rows columns)      (byte-array rows columns
(make-bytes (* rows columns)))]
               [(rows columns val) (byte-array rows columns
(make-bytes (* rows columns) val))]))

....
.....

(module+ main
  (require rackunit)
  ;;make-byte-array tests
  (define 2-3-0-barry (make-byte-array 2 3 ))
   (define 2-3-λ-barry (make-byte-array 2 3 #o377))

  (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))

INTERACTIONS WINDOW
----------------------------------
(rackunit-test-suite
 ...
 "Testing make-byte-array"
 #<procedure:the-tests>
 #<procedure:void-thunk>
 #<procedure:void-thunk>)
>

Thanks,
Harry Spier


Posted on the users mailing list.