Le 22/04/2018 à 05:25, Gregg Williams a écrit :
2) In testAllIsogramSet, why do you need ‘self’? After all ‘isograms’ is a data structure, and its message is ‘do:’
You defined isograms as a method of the class. Therefore only this method returns the data structure you defined there. It is not an instance variable declared in your GramCheckerTest class. In that case you may want to initialize it in your initialize GramCheckerTest class (or for a test case it is better to do it it in the setUp method as it will be called before each test method call):
initialize super initialize. isograms := #('pharo' 'pathfinder' 'xavier' 'lumberjacks’) Then your test method can access it directly (without self): isograms do: [ :word | self assert: word isIsogramSet ] Hilaire -- Dr. Geo http://drgeo.eu