Mantis - Squeak
Viewing Issue Advanced Details
5044 System tweak N/A 09-22-06 16:49 09-22-06 16:49
cbarham  
 
normal  
new 3.9  
open  
none    
none  
0005044: Sunit-Tools Equal/Hash TestCase improvement and tests
Replaced the equalsHashTester as it was not checking anything significant. Taking the cue from the Junitx.extensions class EqualsHashCodeTester, and assuming that the the equality 'contract' of most implementations of #= are similar to the Java specified contract, I have reworked the testcases where possible to use the new class EqualsHashCodeTestCase. From the majority of test I implemented using this class, the assumption regarding how equality works in Squeak seems to hold (except for where classes deliberately use identity equality).

Change Set attached.

Implementation based on http://junit-addons.sourceforge.net/junitx/extensions/EqualsHashCodeTestCase.html [^]
Tests for broad alignment with the contract specified (for Java) at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object) [^]

This is my first submission, and was done as I wanted a better understanding of Sunit. Therefore I am unsure I have all the correct Squeak idioms.

Before I continue and write more tests for the remaining implementations of #= can I get some feedback on the work so far? Is it 'squeaky' enough :-)

 EqualHashTesting.1.cs.zip [^] (3,670 bytes) 09-22-06 16:49

There are no notes attached to this issue.