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

Commitd9e6598

Browse files
update 999 test
1 parenta454a63 commitd9e6598

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed
Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
packagecom.fishercoder.firstthousand;
22

33
importcom.fishercoder.solutions.firstthousand._999;
4-
importorg.junit.BeforeClass;
5-
importorg.junit.Test;
4+
importorg.junit.jupiter.api.BeforeEach;
5+
importorg.junit.jupiter.api.Test;
66

7-
importstaticorg.junit.Assert.assertEquals;
7+
importstaticorg.junit.jupiter.api.Assertions.assertEquals;
88

99
publicclass_999Test {
10-
privatestatic_999.Solution1solution1;
11-
privatestaticchar[][]board;
10+
privatestatic_999.Solution1solution1;
11+
privatestaticchar[][]board;
1212

13-
@BeforeClass
14-
publicstaticvoidsetup() {
15-
solution1 =new_999.Solution1();
16-
}
13+
@BeforeEach
14+
publicvoidsetup() {
15+
solution1 =new_999.Solution1();
16+
}
1717

18-
@Test
19-
publicvoidtest1() {
20-
board =newchar[][]{
21-
{'.','.','.','.','.','.','.','.'},
22-
{'.','.','.','p','.','.','.','.'},
23-
{'.','.','.','R','.','.','.','p'},
24-
{'.','.','.','.','.','.','.','.'},
25-
{'.','.','.','.','.','.','.','.'},
26-
{'.','.','.','p','.','.','.','.'},
27-
{'.','.','.','.','.','.','.','.'},
28-
{'.','.','.','.','.','.','.','.'},
29-
};
30-
assertEquals(3,solution1.numRookCaptures(board));
31-
}
18+
@Test
19+
publicvoidtest1() {
20+
board =newchar[][]{
21+
{'.','.','.','.','.','.','.','.'},
22+
{'.','.','.','p','.','.','.','.'},
23+
{'.','.','.','R','.','.','.','p'},
24+
{'.','.','.','.','.','.','.','.'},
25+
{'.','.','.','.','.','.','.','.'},
26+
{'.','.','.','p','.','.','.','.'},
27+
{'.','.','.','.','.','.','.','.'},
28+
{'.','.','.','.','.','.','.','.'},
29+
};
30+
assertEquals(3,solution1.numRookCaptures(board));
31+
}
3232

33-
@Test
34-
publicvoidtest2() {
35-
board =newchar[][]{
36-
{'.','.','.','.','.','.','.','.'},
37-
{'.','p','p','p','p','p','.','.'},
38-
{'.','p','p','B','p','p','.','.'},
39-
{'.','p','B','R','B','p','.','.'},
40-
{'.','p','p','B','p','p','.','.'},
41-
{'.','p','p','p','p','p','.','.'},
42-
{'.','.','.','.','.','.','.','.'},
43-
{'.','.','.','.','.','.','.','.'},
44-
};
45-
assertEquals(0,solution1.numRookCaptures(board));
46-
}
33+
@Test
34+
publicvoidtest2() {
35+
board =newchar[][]{
36+
{'.','.','.','.','.','.','.','.'},
37+
{'.','p','p','p','p','p','.','.'},
38+
{'.','p','p','B','p','p','.','.'},
39+
{'.','p','B','R','B','p','.','.'},
40+
{'.','p','p','B','p','p','.','.'},
41+
{'.','p','p','p','p','p','.','.'},
42+
{'.','.','.','.','.','.','.','.'},
43+
{'.','.','.','.','.','.','.','.'},
44+
};
45+
assertEquals(0,solution1.numRookCaptures(board));
46+
}
4747

48-
@Test
49-
publicvoidtest3() {
50-
board =newchar[][]{
51-
{'.','.','.','.','.','.','.','.'},
52-
{'.','.','.','p','.','.','.','.'},
53-
{'.','.','.','p','.','.','.','p'},
54-
{'p','p','.','R','.','p','B','.'},
55-
{'.','.','.','.','.','.','.','.'},
56-
{'.','.','.','B','.','.','.','.'},
57-
{'.','.','.','p','.','.','.','.'},
58-
{'.','.','.','.','.','.','.','.'},
59-
};
60-
assertEquals(3,solution1.numRookCaptures(board));
61-
}
48+
@Test
49+
publicvoidtest3() {
50+
board =newchar[][]{
51+
{'.','.','.','.','.','.','.','.'},
52+
{'.','.','.','p','.','.','.','.'},
53+
{'.','.','.','p','.','.','.','p'},
54+
{'p','p','.','R','.','p','B','.'},
55+
{'.','.','.','.','.','.','.','.'},
56+
{'.','.','.','B','.','.','.','.'},
57+
{'.','.','.','p','.','.','.','.'},
58+
{'.','.','.','.','.','.','.','.'},
59+
};
60+
assertEquals(3,solution1.numRookCaptures(board));
61+
}
6262
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp