The fact is that in the case that this test fails, besides that most of the system won't work, at least you will have some hint on where could be the problem. Obviously it's only useful if you're playing with the vm.
ok
On May 11, 2010, at 9:34 PM, Alexandre Bergel wrote:
>> testMetaclassSuperclass
>> � � �"self run: #testMetaclassSuperclass"
>>
>> � � �self assert: Dictionary class superclass == Set class.
>> � � �self assert: OrderedCollection class superclass == SequenceableCollection class.
>
> What is the important is the metaclass relationship, and not really the fact that Dictionary is a subclass of Set.
> I think this is better:
> � � � self assert: Dictionary class superclass == Dictionary superclass class.
> � � � self assert: OrderedCollection class superclass == OrderedCollection superclass class.
but do you think that the system would work if such test would not work?
this one is more interesting
>> I would rewrite the test as:
>
> testSuperclass
> � � � "self debug: #testSuperclass"
>
> � � � | s b |
>
> � � � s := OrderedCollection new.
> � � � b := [:cls | cls ifNotNil: [s add: cls. b value: cls superclass] ].
> � � � b value: OrderedCollection.
>
> � � � self assert: OrderedCollection allSuperclasses = s allButFirst.
> � � � self assert: OrderedCollection withAllSuperclasses = s.
>
> You even test #withAllSuperclasses in that case.
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project