Same for testAllCallsOn, this test is obsolete as soon as you make
modifications in Pharo :)

Such test should use specific classes and messages specially crafted
for the test

Nicolas

2010/1/16 Nicolas Cellier <[email protected]>:
> testAllLocalCallsOn
>        "
>        self debug: #testAllLocalCallsOn
>        "
>
>        | set |
>        set := Array allLocalCallsOn: #printOn:.
>        self assert: (set asArray =  #('WeakActionSequence printOn:' 'Object
> fullPrintString' 'Array printOn:' 'SequenceableCollection
> asStringWithCr' 'Behavior printOn:' 'Class fileOutPool:onFileStream:'
> 'Object printStringLimitedTo:' 'Collection printNameOn:'
> 'ActionSequence printOn:' 'FixedIdentitySet printOn:')).
>        "This is a bit strange that allLocalCallsOn: returns a list of string!"
>
> This one is bad for two reasons:
> 1) it relies on an arbitrary order in Set. For example, just change
> default size of sets and the order will change. Eventually you could
> test set = #() asSet but see 2)
> 2) it relies on a particular snapshot of pharo and prevent pharo from 
> evolving.
>
> Moreover, if a user adds its own sender of printOn: in an extension or
> a subclass, this will make the test fail...
>
> Such test should create a class hierarchy dedicated to the test with a
> know set of senders and test
> Either correct it or remove it.
>
> Nicolas
>

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to