-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSortTest.java
More file actions
50 lines (40 loc) · 1.04 KB
/
Copy pathSortTest.java
File metadata and controls
50 lines (40 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package sort;
import org.junit.Test;
import sort.HillSort;
import sort.InsertSort;
import sort.MergeSort;
import sort.QuickSort;
public class SortTest {
@Test
public void insertSortTest(){
int[] arr = {10, 23, 2, 4, 5, 7, 24, 1};
int[] ints = InsertSort.insertSort(arr);
for (int i : ints) {
System.out.println(i);
}
}
@Test
public void hillSortTest(){
int[] arr = {10, 23, 2, 4, 5, 7, 24, 1};
int[] ints = HillSort.hillSort(arr);
for (int i : ints) {
System.out.println(i);
}
}
@Test
public void quickSortTest() {
int[] arr = {3, 2, 3, 1, 2, 4, 5, 5, 6};
int[] ints = QuickSort.quickSort(arr, 0, arr.length - 1);
for (int i : ints) {
System.out.println(i);
}
}
@Test
public void mergeSortTest() {
int[] arr = {10, 23, 2, 4, 5, 7, 24, 1};
int[] ints = MergeSort.mergeSort(arr);
for (int i : ints) {
System.out.println(i);
}
}
}