Hi Ben, On Tue, May 9, 2017 at 9:44 AM, Ben Coman <b...@openinworld.com> wrote:
> [redirected from pharo-gsoc to pharo-dev] > > On Tue, May 9, 2017 at 7:36 AM, Oleksandr Zaytsev <olk.zayt...@gmail.com> > wrote: > > A. Improved my fix of this case: https://pharo.fogbugz.com/f/cases/19396, > as > > suggested by Ben Coman, and created a slice for it (I think it works > like PR > > in Pharo - correct me if I'm wrong). > > Thanks Olek. The slice is good, and the additional test is good. > > Now after loading the slice and running all system tests from World > > TestRunner > I get 21 errors, since they have code like this... > self assert: (Smalltalk globals classNamed: originalName) isNil. > which needs to be updated and checked that there is no clash in usage. > > Anyone know of a method like... > self assert: (Smalltalk globals classNamed: originalName) raised: > ClassNotFound. > Hmmm, classNamed: has always answered nil for nonexistent classes. Did this get changed? Not sure that's right. Why not add checkedClassNamed: or some such? > which seems more useful than each time doing... > | correctErrorRaised | > correctErrorRaised := false. > [ Smalltalk globals classNamed: #notExistedClass ] > on: ClassNotFound do: [correctErrorRaised := true]. > self assert: correctErrorRaised. > > > btw, one of the failures is ClassTest>>testMethodsReferencingClass > but I'm a little confused by... > self assert: (ClassTest methodsReferencingClass: (Smalltalk > classNamed: #BehaviorTests)) isEmpty > > since there is no "BehaviorTests" in the Image, which effectively is... > self assert: (ClassTest methodsReferencingClass: nil) isEmpty > So is this succeeding by accident? @Pavel, @Vicent can you advise? > i guess it should be BehaviorTest not BehaviorTests, which goes to > show the value > of #classNamed: raising ClassNotFound instead of returning nil. > > cheers -ben > > -- _,,,^..^,,,_ best, Eliot