-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestAssignment.java
More file actions
49 lines (39 loc) · 1.18 KB
/
TestAssignment.java
File metadata and controls
49 lines (39 loc) · 1.18 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
Name and Surname: Regan Koopmans
Student/staff Number: 15043143
*/
import junit.framework.TestCase;
public class TestAssignment extends TestCase
{
public void testTree()
{
BStarTree testingTree = new BStarTree(6);
System.out.println("///////////////////////////////////////////////////////////////////");
System.out.println("\n \tTrivial Inserts \n");
for (int x = 0; x < 40; x++)
{
assertEquals(testingTree.insertElement(new Integer(x)),true);
System.out.println();
testingTree.breadthFirst();
System.out.println();
}
System.out.println();
System.out.println("///////////////////////////////////////////////////////////////////");
System.out.println("\n \tSearches \n");
for (int x = 0; x < 45; x++)
{
System.out.println(x + " : " + testingTree.search(x));
}
System.out.println();
System.out.println("///////////////////////////////////////////////////////////////////");
System.out.println("\n \tTrivial Deletes \n");
for (int x = 0; x < 40; x++)
{
System.out.println("Deleting " + x);
testingTree.deleteElement(new Integer(x));
System.out.println();
testingTree.breadthFirst();
System.out.println();
}
}
}