diff --git a/src/test/java/net/openhft/chronicle/map/ChronicleMapTest.java b/src/test/java/net/openhft/chronicle/map/ChronicleMapTest.java index cb5a50c0b..47c625e42 100755 --- a/src/test/java/net/openhft/chronicle/map/ChronicleMapTest.java +++ b/src/test/java/net/openhft/chronicle/map/ChronicleMapTest.java @@ -173,6 +173,48 @@ public class ChronicleMapTest { map.close(); } + + @Test + public void testEqualsCharSequence() throws Exception { + + ChronicleMapBuilder builder = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class); + + try (final ChronicleMap map1 = builder.create()) { + + map1.put("hello", "world"); + + try (final ChronicleMap map2 = builder.create()) { + map2.put("hello", "world"); + + assertEquals(map1, map2); + } + + } + } + + @Ignore("HCOLL-265 Chronicle Maps with Identical char[] values are not equal") + @Test + public void testEqualsCharArray() throws Exception { + + char[] value = new char[5]; + Arrays.fill(value, 'X'); + + ChronicleMapBuilder builder = ChronicleMapBuilder.of(CharSequence.class, char[].class); + + try (final ChronicleMap map1 = builder.create()) { + + map1.put("hello", value); + + try (final ChronicleMap map2 = builder.create()) { + map2.put("hello", value); + + assertEquals(map1, map2); + } + + } + } + + @Test public void testSize() throws Exception { @@ -1420,7 +1462,6 @@ public class ChronicleMapTest { } - @Test(expected = IllegalStateException.class) public void testPutLongValue() throws IOException { final ChronicleMapBuilder builder = ChronicleMapBuilder