[squeak-dev] Re: 0006721: Identity dictionarys sometimes can't find their keys

Levente Uzonyi leves at elte.hu
Tue Mar 2 02:21:38 UTC 2010


On Sun, 28 Feb 2010, Jerome Peace wrote:

>
> Levente Uzonyi leves at elte.hu
> Sun Feb 28 17:56:00 UTC 2010 replied:
>
>
>> nil was always a valid key for Dictionary and IdentityDictionary. Sets
>> were the collections which couldn't contain nil.
>
>
>> Levente
>
> Ha. I knew there was a good reason for having someone look over your shoulder as you program. I stand corrected.
>
> Never the less, the tests were useful in finding bugs.
>
> Even if 'nil' can be a legitimate key its presence is often the sign of a bug. The only instance my test found pointed to the initialization of GeeMailMorph being misplaced to UndefinedObject class. So even though I stumbled on to it with a mis-assumption the test found it. I think it's valuable to go looking, then note the legitimate exceptions in the test.
>
> I would love to see my tests in the image and your test improvements as well. I am still looking for a MC savvy code partner to take over some of the driving.

I added the general purpose integrity tests to the Trunk. Details here:
http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/145266.html
I think a test which fails when an object has a valid (and supported) 
state is simply wrong.

Here are a few links which cover MC:
http://wiki.squeak.org/squeak/43
http://www.wiresong.ca/Monticello/UserManual/
http://wiki.squeak.org/squeak/1287
http://www.youtube.com/watch?v=eCwzcOk6vY4
http://vimeo.com/groups/squeak/videos/7783848
etc. (probably SBE/PBE has a chapter about MC too)


Levente

>
> Cheers --Jer
>
> "Debugger's don't need exact knowledge as long at they have interesting tests and a willingness to learn."  --Fearless Bugtrackers secret codex
>
>
>
>
>
>
>



More information about the Squeak-dev mailing list