-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest0001.java
More file actions
35 lines (27 loc) · 879 Bytes
/
Test0001.java
File metadata and controls
35 lines (27 loc) · 879 Bytes
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
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/10/21
*/
class Test0001 {
private final Solution0001 solution = new Solution0001();
@Test
@DisplayName("1 Two Sum Prefer Memory")
void testSolutionPreferMemory() {
int[] expected = {0, 1};
int[] nums = {2, 7, 11, 15};
int target = 9;
assertArrayEquals(expected, solution.twoSumPreferMemory(nums, target));
}
@Test
@DisplayName("1 Two Sum Prefer Performance")
void testSolutionPreferPerformance() {
int[] expected = {0, 1};
int[] nums = {2, 7, 11, 15};
int target = 9;
assertArrayEquals(expected, solution.twoSumPreferPerformance(nums, target));
}
}