[plt-scheme] Re: [plt-edu] Why is testing not working?

From: Michael Vanier (mvanier at cs.caltech.edu)
Date: Wed Nov 12 20:45:08 EST 2008

Marco,

Does DrScheme allow you to evaluate anything in the interactions window 
at all?  I.e. if you do

(+ 2 2)

in the interactions window, does it report "4"?  Similarly, does it 
allow you to define a simple function in the defintions window and 
evaluate it in the interactions window?  I'm just wondering if something 
more fundamental than testing is wrong here.

Mike


Marco Morazan wrote:
> This does not look promising. :-( I can not reproduce the behavior on
> any of my machines. I have worked on the machine of my student and it
> does not report anything about tests passing or not. It does not
> complain about now knowing check-expect. It is just weird. I
> personally unistalled and re-intalled DrScheme and no difference.
>
> The student is running Windows Vista (as on one of my machines) on a
> Sony Vaio. Does any of this matter?
>
> If anyone has suggestions, I welcome them.
>
> Marco
>
> On Wed, Nov 12, 2008 at 5:32 PM, Matthias Felleisen
> <matthias at ccs.neu.edu> wrote:
>   
>> I can't reproduce this result at all. I copied your code into an empty def
>> window and added the define-struct. I get this in the interactions window:
>>
>>
>>     
>>> Welcome to DrScheme, version 4.1.2.4-svn11nov2008 [3m].
>>> Language: Intermediate Student with lambda.
>>> All tests passed!
>>>       
>> (Of course the tests don't cover everything and the code doesn't follow the
>> design recipe. :-)
>>
>> -- Matthias
>>
>>
>>
>>
>>
>> On Nov 12, 2008, at 3:38 PM, Marco Morazan wrote:
>>
>>     
>>> Dear All,
>>>
>>> I have a student who wrote the following code:
>>>
>>> ; Oldest Generation
>>> (define Petrona (make-child empty empty 'Petrona 1876 'Brown))
>>> (define Petr (make-child empty empty 'Petr 1896 'Brown))
>>> (define Lena (make-child empty empty 'Lena 1896 'Brown))
>>> ; Second Oldest Generation
>>> (define Jose (make-child empty Petrona 'Jose 1895 'Brown))
>>> (define Marina (make-child empty empty 'Marina 1910 'Brown))
>>> (define Walter (make-child empty empty 'Walter 1912 'Blue))
>>> (define Helen (make-child Petr Lena 'Helen 1917 'Brown))
>>> ; Third Oldest Generation
>>> (define Marco2 (make-child Jose Marina 'Marco 1934 'Brown))
>>> (define Doris (make-child Walter Helen 'Doris 1935 'Brown))
>>> ; Youngest Generation
>>> (define Marco (make-child Marco2 Doris 'Marco 1967 'Brown))
>>>
>>> ;numanc: at -> num
>>> (define (numanc an-at)
>>>  (cond [(empty? an-at) 0]
>>>           [else (+ (parents an-at) (numanc (child-mother an-at))
>>> (numanc (child-father an-at)))]))
>>>
>>> ; parents at -> num
>>>          (define (parents an-at)
>>>          (cond
>>>            [(empty? an-at) 0]
>>>            [(and (empty? (child-mother an-at))(empty? (child-father
>>> an-at))) 0]
>>>            [(or (empty? (child-mother an-at))(empty? (child-father
>>> an-at))) 1]
>>>            [else 2]))
>>>
>>> ;examples
>>>
>>> (check-expect (numanc Petrona) 0)
>>> (check-expect (numanc Jose) 1)
>>> (check-expect (numanc Marco2) 3)
>>> (check-expect (numanc Marco) 9)
>>>
>>>
>>> The output in the interactions window after hitting run is:
>>>
>>> Welcome to DrScheme, version 4.1.2 [3m].
>>> Language: Beginning Student with List Abbreviations; memory limit: 128
>>> megabytes.
>>>       
>>> As you can see, no indication of tests passing. Any suggestions? We
>>> uninstalled and re-installed DrScheme. We explictily added testing.ss.
>>> All to no avail.
>>>
>>> --
>>>
>>> Cheers,
>>>
>>> Marco
>>> _________________________________________________
>>> PLT Educators mailing list
>>> plt-edu at list.cs.brown.edu
>>> http://list.cs.brown.edu/mailman/listinfo/plt-edu
>>>       
>>     
>
>
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20081112/23ab18ee/attachment.html>

Posted on the users mailing list.