[plt-scheme] Test the Program

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Sep 2 17:57:29 EDT 2009

On Sep 2, 2009, at 4:06 PM, Asher, Gregg wrote:

> I apologize if this question has been asked before. I checked the  
> archives and couldn’t find my problem listed.
> When I define a program in the definitions window and then enter the  
> program name in the interactive window substituting a value for the  
> parameter and then “Run” (my version of Dr. Scheme doesn’t have an  
> ”Execute” button

(It's sad enough that we execute people, so we thought we shouldn't  
execute programs, too.)

> ) the program I don’t the results of the program but a message “This  
> program should be tested.
> >”

This is the case for teaching languages because we want to remind the  
students that w/o testing a program isn't complete.

Jon replied with the concrete answer. Students should write 'unit  
tests' such as

(check-expect (area-of-disk 3) 123456789)
(check-expect (area-of-disk 4) 0)

and inspect the replies. They should also note that insufficient  
testing colors their program in weird ways. -- Matthias

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

Posted on the users mailing list.