[plt-scheme] Re: Using check-expect in the module language

From: Kathy Gray (kathryn.gray at cl.cam.ac.uk)
Date: Mon Sep 15 16:33:17 EDT 2008

>>>
> Date: Sun, 14 Sep 2008 22:39:55 -0700
> From: Michael Vanier <mvanier42 at gmail.com>
> Subject: [plt-scheme] Using check-expect in the module language
> To: plt-scheme at list.cs.brown.edu
> Message-ID: <48CDF52B.6030805 at cs.caltech.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I'm trying to use the check-expect form from the teaching languages  
> in the module language, but it doesn't work the way I expected.  For  
> instance:
>
>>
>> #lang scheme
>>
>> (require test-engine/scheme-tests)
>>
>> (define (double x)
>>  (* x 2))
>>
>> (check-expect (double 10) 30.2)
>>
>
> Doesn't report an error.  What do I need to do to get it to report  
> the error in the same form as in the teaching languages?
>

Calling the function test (with no arguments) produces a textual error  
report on run (like generate-report produces from htdp/testing). If  
you want the graphical report, you should require test-engine/scheme- 
gui instead; it provides all of the same functions but opens a window  
when run instead.

At this time, the integrated error window only works in the teaching  
languages (and the ProfessorJ languages).

-Kathy
p.s. htdp/testing is deprecated and shouldn't be used



Posted on the users mailing list.