-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest0075.java
More file actions
45 lines (35 loc) · 1.06 KB
/
Test0075.java
File metadata and controls
45 lines (35 loc) · 1.06 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
package leetcode;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
/**
* @author xiangdotzhaoAtwoqutechcommacom
* @date 2019/12/14
*/
class Test0075 {
private final Solution0075 solution = new Solution0075();
@Test
@DisplayName("75 Sort Colors")
void sortColors() {
int[] expected = {0, 0, 1, 1, 2, 2};
int[] input = {2, 0, 2, 1, 1, 0};
solution.sortColors(input);
assertArrayEquals(expected, input);
}
@Test
@DisplayName("75 Sort Colors")
void sortColorsCountSort() {
int[] expected = {0, 0, 1, 1, 2, 2};
int[] input = {2, 0, 2, 1, 1, 0};
solution.sortColorsCountSort(input);
assertArrayEquals(expected, input);
}
@Test
@DisplayName("75 Sort Colors")
void sortColorsThreePartition() {
int[] expected = {0, 0, 1, 1, 2, 2};
int[] input = {2, 0, 2, 1, 1, 0};
solution.sortColorsPerf(input);
assertArrayEquals(expected, input);
}
}