forked from jvm-coder/Hacktoberfest2022_aakash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTreeMapTests.java
More file actions
28 lines (21 loc) · 1.04 KB
/
TreeMapTests.java
File metadata and controls
28 lines (21 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.jwetherell.algorithms.data_structures.test;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import com.jwetherell.algorithms.data_structures.TreeMap;
import com.jwetherell.algorithms.data_structures.test.common.JavaMapTest;
import com.jwetherell.algorithms.data_structures.test.common.MapTest;
import com.jwetherell.algorithms.data_structures.test.common.Utils;
import com.jwetherell.algorithms.data_structures.test.common.Utils.TestData;
public class TreeMapTests {
@Test
public void testTreeMap() {
TestData data = Utils.generateTestData(1000);
String mapName = "TreeMap";
TreeMap<String,Integer> map = new TreeMap<String,Integer>();
java.util.Map<String,Integer> jMap = map.toMap();
assertTrue(MapTest.testMap(map, String.class, mapName,
data.unsorted, data.invalid));
assertTrue(JavaMapTest.testJavaMap(jMap, Integer.class, mapName,
data.unsorted, data.sorted, data.invalid));
}
}