diff --git a/primitiveCollections/src/test/java/org/lucares/collections/IntListTest.java b/primitiveCollections/src/test/java/org/lucares/collections/IntListTest.java index c56c4df..0011d81 100644 --- a/primitiveCollections/src/test/java/org/lucares/collections/IntListTest.java +++ b/primitiveCollections/src/test/java/org/lucares/collections/IntListTest.java @@ -516,6 +516,7 @@ public class IntListTest { Assert.assertTrue(list.isSorted()); } + @SuppressWarnings("unlikely-arg-type") @Test public void testHashCodeEquals() { final IntList a = new IntList(); @@ -537,8 +538,6 @@ public class IntListTest { Assert.assertTrue(a.equals(b)); Assert.assertEquals(a.hashCode(), b.hashCode()); - // TODO sorted and unsorted lists with same length - // change one value a.remove(2, 3); a.insert(2, 99); @@ -558,6 +557,12 @@ public class IntListTest { // equals with a different class Assert.assertFalse(a.equals("not an IntList")); + + // sorted and unsorted lists with same length + final IntList sorted = IntList.of(1, 2, 3, 4); + final IntList unsorted = IntList.of(4, 3, 2, 1); + Assert.assertFalse(sorted.equals(unsorted)); + Assert.assertNotEquals(sorted.hashCode(), unsorted.hashCode()); } @Test