Browse Source

Tests: Correction in AbstractShapeBuilderTestCase

Removed check that two shapes that are different according
to equals() have different hashCode since that is not required
by the contract of hashCode.
Christoph Büscher 10 years ago
parent
commit
a0fe93fa67

+ 0 - 1
core/src/test/java/org/elasticsearch/common/geo/builders/AbstractShapeBuilderTestCase.java

@@ -111,7 +111,6 @@ public abstract class AbstractShapeBuilderTestCase<SB extends ShapeBuilder> exte
             assertThat("same shape's hashcode returns different values if called multiple times", firstShape.hashCode(),
                     equalTo(firstShape.hashCode()));
             assertThat("different shapes should not be equal", mutate(firstShape), not(equalTo(firstShape)));
-            assertThat("different shapes should have different hashcode", mutate(firstShape).hashCode(), not(equalTo(firstShape.hashCode())));
 
             SB secondShape = copyShape(firstShape);
             assertTrue("shape is not equal to self", secondShape.equals(secondShape));