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

Commitc5242b1

Browse files
refactor 538 test
1 parentc9e8315 commitc5242b1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
importstaticjunit.framework.Assert.assertEquals;
1010

1111
publicclass_538Test {
12-
privatestatic_538.Solution2solution2;
1312
privatestatic_538.Solution1solution1;
13+
privatestatic_538.Solution2solution2;
1414
privatestaticTreeNodeexpectedRoot;
1515
privatestaticTreeNoderoot;
1616

@@ -20,10 +20,6 @@ public static void setup() {
2020
solution2 =new_538.Solution2();
2121
}
2222

23-
@Before
24-
publicvoidsetupForEachTest() {
25-
}
26-
2723
@Test
2824
publicvoidtest1() {
2925
root =newTreeNode(5);
@@ -32,15 +28,15 @@ public void test1() {
3228
expectedRoot =newTreeNode(18);
3329
expectedRoot.left =newTreeNode(20);
3430
expectedRoot.right =newTreeNode(13);
35-
assertEquals(expectedRoot.toString(),solution2.convertBST(root).toString());
3631
assertEquals(expectedRoot.toString(),solution1.convertBST(root).toString());
32+
assertEquals(expectedRoot.toString(),solution2.convertBST(root).toString());
3733
}
3834

3935
@Test
4036
publicvoidtest2() {
4137
root =null;
4238
expectedRoot =null;
43-
assertEquals(expectedRoot,solution2.convertBST(root));
4439
assertEquals(expectedRoot,solution1.convertBST(root));
40+
assertEquals(expectedRoot,solution2.convertBST(root));
4541
}
4642
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp