Skip to content

Commit 0a1a34d

Browse files
refactor 98
1 parent 6161beb commit 0a1a34d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/test/java/com/fishercoder/_98Test.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
package com.fishercoder;
22

33
import com.fishercoder.common.classes.TreeNode;
4+
import com.fishercoder.common.utils.TreeUtils;
45
import com.fishercoder.solutions._98;
56
import org.junit.BeforeClass;
67
import org.junit.Test;
78

9+
import java.util.Arrays;
10+
811
import static org.junit.Assert.assertEquals;
912

1013
/**
@@ -39,4 +42,11 @@ public void test3() {
3942
root.left = new TreeNode(1);
4043
assertEquals(false, solution1.isValidBST(root));
4144
}
45+
46+
@Test
47+
public void test4() {
48+
root = TreeUtils.constructBinaryTree(Arrays.asList(5, 1, 7, null, null, 3, 8));
49+
TreeUtils.printBinaryTree(root);
50+
assertEquals(false, solution1.isValidBST(root));
51+
}
4252
}

0 commit comments

Comments
 (0)