8000 add test for 33 · zhahui/fishercoder1534-Leetcode@bc2c564 · GitHub
[go: up one dir, main page]

Skip to content

Commit bc2c564

Browse files
fishercoder1534zhahui
authored andcommitted
add test for 33
1 parent de76b61 commit bc2c564

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.solutions._33;
4+
import org.junit.BeforeClass;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.assertEquals;
8+
9+
public class _33Test {
10+
private static _33.Solution1 solution1;
11+
private static _33.Solution2 solution2;
12+
private static int[] nums;
13+
14+
@BeforeClass
15+
public static void setup() {
16+
solution1 = new _33.Solution1();
17+
solution2 = new _33.Solution2();
18+
}
19+
20+
@Test
21+
public void test1() {
22+
nums = new int[]{4, 5, 6, 7, 0, 1, 2};
23+
assertEquals(3, solution1.search(nums, 7));
24+
assertEquals(3, solution2.search(nums, 7));
25+
}
26+
}

0 commit comments

Comments
 (0)
0