[plt-scheme] Re: PLT Scheme v370

From: Todd O'Bryan (toddobryan at mac.com)
Date: Thu May 24 19:30:25 EDT 2007

On Thu, 2007-05-24 at 17:45 -0400, Chris Warrington wrote:

> (require (lib "testing.ss" "htdp"))
> (check-expect (+ 1 1) 2)
> (check-expect (+ 1 1) 3)
> (check-error (/ 1 0) "/: division by zero")
> (check-error (/ 1 2) "/: division by zero")
> (generate-report)
> That's pretty nice. However, I can't seem to copy text from the
> results window.
How hard would it be to not require the (generate-report) function and
just print the results above the first prompt in the interactions
window. Something like:

Welcome to DrScheme, v370.
Language: Beginning Student
Teachpack: /blah/blah/testing.ss
22 of 25 tests passed. (Evaluate (generate-report) for details.)

The extra window was a little bit annoying to me when I played with it,
and I'm afraid students may stop generating the report just so they
don't have to close it every time they hit run.

Also, while I'm wishing, how about adding another line that says, e.g.,

92% of code exercised by tests.


P.S. I think (check-expect ...) and (check-error ...) are great
improvements over both the previous "should be" and test-box

Posted on the users mailing list.