Skip to content

Commit c9ea706

Browse files
add test for 90
1 parent 480ba2b commit c9ea706

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

src/main/java/com/fishercoder/solutions/_90.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
public class _90 {
2727

2828
public static class Solution1 {
29-
public static List<List<Integer>> subsetsWithDup(int[] nums) {
29+
public List<List<Integer>> subsetsWithDup(int[] nums) {
3030
List<List<Integer>> result = new ArrayList();
3131
List<Integer> empty = new ArrayList();
3232
result.add(empty);
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.common.utils.CommonUtils;
4+
import com.fishercoder.solutions._90;
5+
import org.junit.BeforeClass;
6+
import org.junit.Test;
7+
8+
public class _90Test {
9+
private static _90.Solution1 solution1;
10+
private static _90.Solution2 solution2;
11+
private static _90.Solution3 solution3;
12+
13+
@BeforeClass
14+
public static void setup() {
15+
solution1 = new _90.Solution1();
16+
solution2 = new _90.Solution2();
17+
solution3 = new _90.Solution3();
18+
}
19+
20+
@Test
21+
public void test1() {
22+
CommonUtils.printListList(solution1.subsetsWithDup(new int[]{1, 2, 2}));
23+
}
24+
25+
@Test
26+
public void test2() {
27+
CommonUtils.printListList(solution2.subsetsWithDup(new int[]{1, 2, 2}));
28+
}
29+
30+
@Test
31+
public void test3() {
32+
CommonUtils.printListList(solution3.subsetsWithDup(new int[]{1, 2, 2}));
33+
}
34+
35+
}

0 commit comments

Comments
 (0)