Пример #1
0
 @Test
 public void testClone() {
   OpenShortDoubleHashMap map = new OpenShortDoubleHashMap();
   map.put((short) 11, (double) 22);
   OpenShortDoubleHashMap map2 = (OpenShortDoubleHashMap) map.clone();
   map.clear();
   assertEquals(1, map2.size());
 }
Пример #2
0
 @Test
 public void testClear() {
   OpenShortDoubleHashMap map = new OpenShortDoubleHashMap();
   map.put((short) 11, (double) 22);
   assertEquals(1, map.size());
   map.clear();
   assertEquals(0, map.size());
   assertEquals(0, map.get((short) 11), 0.0000001);
 }