KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jodd > util > collection > IntHashMapTest


1 // Copyright (c) 2003-2007, Jodd Team (jodd.sf.net). All Rights Reserved.
2

3 package jodd.util.collection;
4
5 import junit.framework.TestCase;
6
7 public class IntHashMapTest extends TestCase {
8
9     public void testAll() {
10         IntHashMap ihm = new IntHashMap();
11
12         for (int i = 0; i < 10000; i++) {
13             ihm.put(i, new Integer JavaDoc(i));
14         }
15
16         for (int i = 0; i < 10000; i++) {
17             assertEquals(((Integer JavaDoc)ihm.get(i)).intValue(), i);
18         }
19     }
20
21 }
22
Popular Tags