Skip to content

Commit df7c3b1

Browse files
add a test for 94
1 parent 32e93cd commit df7c3b1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/test/java/com/fishercoder/_94Test.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212

1313
public class _94Test {
1414
private static _94.Solution1 solution1;
15+
private static _94.Solution2 solution2;
1516
private static TreeNode root;
1617
private static List<Integer> inorder;
1718

1819
@BeforeClass
1920
public static void setup() {
2021
solution1 = new _94.Solution1();
22+
solution2 = new _94.Solution2();
2123
}
2224

2325
@Test
@@ -35,4 +37,12 @@ public void test2() {
3537
CommonUtils.printList(inorder);
3638
}
3739

40+
@Test
41+
public void test3() {
42+
root = TreeUtils.constructBinaryTree(Arrays.asList(1, 2, 3, 4, null, 5, null, null, 6));
43+
TreeUtils.printBinaryTree(root);
44+
inorder = solution2.inorderTraversal(root);
45+
CommonUtils.printList(inorder);
46+
}
47+
3848
}

0 commit comments

Comments
 (0)