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.
If we are going test this, (I don't know if we already have it) would be useful to test a basic message sending. And to have a testWellCompiledMethods (or something like that) that checks if all the methods are correctly compiled, e.g.: a method which instead of referencing the instance variable that says in it's source, references the next one. I think that something of that is actually implemented in SmallLint for VASmalltalk, but I may be wrong... This tests could be some sort of: "if this doesn't work, it's all FUBAR<http://en.wikipedia.org/wiki/FUBAR>" :) +1 to Alexandre's version. Cheers, Mariano. On Tue, May 11, 2010 at 5:39 PM, Stéphane Ducasse <[email protected] > wrote: > > 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 >
_______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
