'From Squeak3.4 of 1 March 2003 [latest update: #5170] on 8 March 2003 at 11:54:22 am'! "Change Set: MethodReferenceHashTest-dgd Date: 8 March 2003 Author: Diego Gomez Deck Method MethodReferenceTest>>= is implemented but MethodReferenceTest>>hash isn't - MethodReferenceTest>>testEqualsAndHash test that shows the error (and probe the fix) "! TestCase subclass: #MethodReferenceTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Tools-Browser'! !MethodReferenceTest methodsFor: 'Running' stamp: 'dgd 3/8/2003 11:48'! testEquals | aMethodReference anotherMethodReference | aMethodReference _ MethodReference new. anotherMethodReference _ MethodReference new. " two fresh instances should be equals between them" self should: [aMethodReference = anotherMethodReference]. self should: [aMethodReference hash = anotherMethodReference hash]. " two instances representing the same method (same class and same selector) should be equals" aMethodReference setStandardClass: String methodSymbol: #foo. anotherMethodReference setStandardClass: String methodSymbol: #foo. self should: [aMethodReference = anotherMethodReference]. self should: [aMethodReference hash = anotherMethodReference hash] ! ! !MethodReferenceTest methodsFor: 'Running' stamp: 'dgd 3/8/2003 11:48'! testNotEquals | aMethodReference anotherMethodReference | aMethodReference _ MethodReference new. anotherMethodReference _ MethodReference new. "" aMethodReference setStandardClass: String methodSymbol: #foo. anotherMethodReference setStandardClass: String class methodSymbol: #foo. " differente classes, same selector -> no more equals" self shouldnt: [aMethodReference = anotherMethodReference]. " same classes, diferente selector -> no more equals" anotherMethodReference setStandardClass: String methodSymbol: #bar. self shouldnt: [aMethodReference = anotherMethodReference] ! ! MethodReferenceTest removeSelector: #testEqualsAndHash!