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

Commit829f5a5

Browse files
refactor 116
1 parent0522cd8 commit829f5a5

File tree

1 file changed

+30
-16
lines changed

1 file changed

+30
-16
lines changed

‎src/test/java/com/fishercoder/_116Test.java

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,37 @@
66
importorg.junit.Test;
77

88
publicclass_116Test {
9-
privatestatic_116.Solution1solution1;
10-
privatestaticTreeLinkNoderoot;
9+
privatestatic_116.Solution1solution1;
10+
privatestatic_116.Solution2solution2;
11+
privatestaticTreeLinkNoderoot;
1112

12-
@BeforeClass
13-
publicstaticvoidsetup() {
14-
solution1 =new_116.Solution1();
15-
}
13+
@BeforeClass
14+
publicstaticvoidsetup() {
15+
solution1 =new_116.Solution1();
16+
solution2 =new_116.Solution2();
17+
}
1618

17-
@Test
18-
publicvoidtest1() {
19-
root =newTreeLinkNode(1);
20-
root.left =newTreeLinkNode(2);
21-
root.right =newTreeLinkNode(3);
22-
root.left.left =newTreeLinkNode(4);
23-
root.left.right =newTreeLinkNode(5);
24-
root.right.right =newTreeLinkNode(7);
19+
@Test
20+
publicvoidtest1() {
21+
root =newTreeLinkNode(1);
22+
root.left =newTreeLinkNode(2);
23+
root.right =newTreeLinkNode(3);
24+
root.left.left =newTreeLinkNode(4);
25+
root.left.right =newTreeLinkNode(5);
26+
root.right.right =newTreeLinkNode(7);
2527

26-
solution1.connect(root);
27-
}
28+
solution1.connect(root);
29+
}
30+
31+
@Test
32+
publicvoidtest2() {
33+
root =newTreeLinkNode(1);
34+
root.left =newTreeLinkNode(2);
35+
root.right =newTreeLinkNode(3);
36+
root.left.left =newTreeLinkNode(4);
37+
root.left.right =newTreeLinkNode(5);
38+
root.right.right =newTreeLinkNode(7);
39+
40+
solution2.connect(root);
41+
}
2842
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp