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

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Nov 12 20:38:43 EST 2008

It would help if you could provide a program (as small as possible!)
and series of step-by-step instructions from a newly started DrScheme
(presumably just 'paste in this code' and hit Run). Please also
include a copy/paste of the entire interactions window. These made
shed some light.

The architecture of your machine is extremely unlikely to be relevant.

Robby

On Wed, Nov 12, 2008 at 7:33 PM, Marco Morazan <morazanm at gmail.com> 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
>>
>>
>
>
>
> --
>
> Cheers,
>
> Marco
> _________________________________________________
> PLT Educators mailing list
> plt-edu at list.cs.brown.edu
> http://list.cs.brown.edu/mailman/listinfo/plt-edu
>
>


Posted on the users mailing list.