New issue 79 by JohnnyJianHY: Default behaviors for hashCode() and equals()
on the Java side in record stage
http://code.google.com/p/gmock/issues/detail?id=79
I was facing a problem when I was working on the collaborator sample. When
I called "classUnderTest.addListener(mock)" in the setup() method, it threw
an ClassCastException. I looked into the code of ClassUnderTest, and found:
public void addListener(Collaborator listener) {
listeners.add(listener);
}
here listeners is a HashMap, and mock.hashCode() returned a MethodRecorder
instead of an integer, so it failed.
I think we should do the same thing for hashCode() and equals() as
toString() in JavaMethodInterceptor.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings