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.
ok but do you think that the system would work if such test would not work? >> 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. this one is more interesting _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
