mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-247 added test
This commit is contained in:
@@ -431,8 +431,8 @@ public class CHMUseCasesTest {
|
||||
InterruptedException {
|
||||
try (ChronicleMap<ByteBuffer, ByteBuffer> map = ChronicleMapBuilder
|
||||
.of(ByteBuffer.class, ByteBuffer.class)
|
||||
// .keyMarshaller(ByteBufferMarshaller.INSTANCE)
|
||||
// .valueMarshaller(ByteBufferMarshaller.INSTANCE)
|
||||
// .keyMarshaller(ByteBufferMarshaller.INSTANCE)
|
||||
// .valueMarshaller(ByteBufferMarshaller.INSTANCE)
|
||||
.keySize(8)
|
||||
.valueSize(8)
|
||||
.maxEntryOversizeFactor(1)
|
||||
@@ -1600,6 +1600,18 @@ public class CHMUseCasesTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMapStringIntegerValueWithoutListMarshallers() {
|
||||
try (ChronicleMap<String, Map<String, Integer>> map = ChronicleMapBuilder
|
||||
.of(String.class, (Class<Map<String, Integer>>) (Class) Map.class)
|
||||
.create()) {
|
||||
map.put("1", Collections.<String, Integer>emptyMap());
|
||||
map.put("2", mapOf("two", 2));
|
||||
|
||||
assertEquals(mapOf("two", 2), map.get("2"));
|
||||
}
|
||||
}
|
||||
|
||||
public static <K, V> Map<K, V> mapOf(K k, V v, Object... keysAndValues) {
|
||||
Map<K, V> ret = new LinkedHashMap<>();
|
||||
ret.put(k, v);
|
||||
|
||||
Reference in New Issue
Block a user