Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc2c564

Browse files
fishercoder1534zhahui
authored andcommitted
add test for 33
1 parentde76b61 commitbc2c564

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+
packagecom.fishercoder;
2+
3+
importcom.fishercoder.solutions._33;
4+
importorg.junit.BeforeClass;
5+
importorg.junit.Test;
6+
7+
importstaticorg.junit.Assert.assertEquals;
8+
9+
publicclass_33Test {
10+
privatestatic_33.Solution1solution1;
11+
privatestatic_33.Solution2solution2;
12+
privatestaticint[]nums;
13+
14+
@BeforeClass
15+
publicstaticvoidsetup() {
16+
solution1 =new_33.Solution1();
17+
solution2 =new_33.Solution2();
18+
}
19+
20+
@Test
21+
publicvoidtest1() {
22+
nums =newint[]{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)

[8]ページ先頭

©2009-2025 Movatter.jp