<br><br><div class="gmail_quote">On Mon, Nov 26, 2012 at 9:45 PM, Harry Spier <span dir="ltr"><<a href="mailto:vasishtha.spier@gmail.com" target="_blank">vasishtha.spier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm using rackunit for the first time. In the code below (simulating<br>
a 2-dimensional byte array by a structure with a byte-string) passes<br>
the tests but I get these messages.<br>
Can someone tell me what the messages in the interactions window are all about.<br>
<br></blockquote><div><br></div><div><br></div><div>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:</div>
<div><br></div><div>;;;;;;;;;;;;;;;;;;;;;;;</div><div><br></div><div><div>(module+ main</div><div> (require rackunit rackunit/text-ui)</div><div> ;;make-byte-array tests</div><div> (define 2-3-0-barry (make-byte-array 2 3 ))</div>
<div> (define 2-3-λ-barry (make-byte-array 2 3 #o377))</div><div> </div><div> (define my-test-suite</div><div> (test-suite </div><div> "Testing make-byte-array"</div><div> (check equal? (byte-array-string 2-3-0-barry) #"\0\0\0\0\0\0")</div>
<div> (check equal? (byte-array-string 2-3-λ-barry) #"\377\377\377\377\377\377")</div><div> (check equal? (byte-array-row-count 2-3-0-barry) 2)</div><div> (check equal? (byte-array-column-count 2-3-0-barry) 3)))</div>
<div> </div><div> (run-tests my-test-suite))</div></div><div><br></div><div><div>;;;;;;;;;;;;;;;;;;;;;;;</div></div><div><br></div><div><br></div><div>For more information, take a look near the end of <a href="http://docs.racket-lang.org/rackunit/quick-start.html">http://docs.racket-lang.org/rackunit/quick-start.html</a>, where the example organizes the checks into a "suite".</div>
<div><br></div><div><br></div><div>Best of wishes!</div></div>