I would keep it Now may be we should improve SUnit to add the possibility to have long tests.... I think that this is really important that we do not get stuck with what we have. Stef On Jun 26, 2008, at 12:38 AM, Norbert Hartl wrote:
I thought once more about this test. I'm reluctant to have this test removed. On the other hand is Adrien right. He states that a lot of test classes are doing calls to methods they created while the test runs.
One solution would be to change the test to use perform: to invoke those methods. But that would making tests a bit tedious. So this is not my preferred solution.
I tweaked SystemNavigation>>allUnimplementedNonPrimitiveCalls to
allUnimplementedNonPrimitiveCallsX "Answer an Array of each message that is sent by an expression in a method but is not implemented by any object in the system." | all meth dict | dict := Dictionary new. all := self systemNavigation allImplementedMessages. self systemNavigation allBehaviorsDo: [:cl | cl selectorsDo: [:sel | meth := cl compiledMethodAt: sel. meth primitive = 0 ifTrue: [ meth messages do: [:m | (all includes: m) ifFalse: [ ((dict at: cl ifAbsentPut: [ Dictionary new ]) at: sel ifAbsentPut: [ OrderedCollection new]) add: m ] ] ] ] ]. ^ dict
So the test would be like
(SystemNavigation default allUnimplementedNonPrimitiveCallsX associationsSelect: [:a| (a key allSuperclasses includes: TestCase) not ]) isEmpty
Would this or something similar be useful or is this just a lot of noise without much of a benefit?
Norbert
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project