mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
remove unused code
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.alibaba.druid.bvt.utils;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.alibaba.druid.util.ConcurrentIdentityHashMap;
|
||||
|
||||
public class ConcurrentIdentityHashMapTest extends TestCase {
|
||||
|
||||
public void test_0() throws Exception {
|
||||
ConcurrentIdentityHashMap<Integer, String> map = new ConcurrentIdentityHashMap<Integer, String>();
|
||||
|
||||
Integer v1 = new Integer(3);
|
||||
map.put(v1, "3");
|
||||
|
||||
Assert.assertTrue(map.contains("3"));
|
||||
Assert.assertTrue(map.containsKey(v1));
|
||||
|
||||
Assert.assertFalse(map.contains("4"));
|
||||
Assert.assertFalse(map.containsKey(new Integer(3)));
|
||||
|
||||
map.put(v1, "33");
|
||||
Assert.assertFalse(map.contains("3"));
|
||||
Assert.assertTrue(map.contains("33"));
|
||||
|
||||
Assert.assertEquals(1, map.size());
|
||||
|
||||
map.clear();
|
||||
Assert.assertEquals(0, map.size());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user