comparison src/test/java/jp/ac/u_ryukyu/ie/cr/data/treemap/TreeNodeIteratorTest.java @ 0:44465893e8b8

first Commit
author Kazuma
date Wed, 30 Nov 2016 01:47:55 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:44465893e8b8
1 package jp.ac.u_ryukyu.ie.cr.data.treemap;
2
3 import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap;
4 import junit.framework.Assert;
5 import org.junit.Test;
6
7 import java.util.Iterator;
8
9 /**
10 * Created by e115731 on 15/05/06.
11 */
12 public class TreeNodeIteratorTest {
13 @Test
14 public void getKeyTest() {
15 TreeMap<Integer, Integer> map = new TreeMap();
16 for (int attributeMaxCount = 10; attributeMaxCount < 1000; attributeMaxCount = attributeMaxCount + 10) {
17 for (int count = 0; count < attributeMaxCount; count++) { //insertData
18 map = map.put(count, count);
19 }
20 Iterator<Integer> it = map.keys();
21 int iteratorCount = 0;
22 while (it.hasNext()) { // count return iterator Attribute Count
23 iteratorCount++;
24 System.out.println(it.next());
25 }
26 Assert.assertTrue(iteratorCount == attributeMaxCount); // check
27 }
28
29 }
30 }