Open jinniw43805 opened 5 years ago
Just look TreeNode unit test part in source file https://github.com/helloShen/leetcode-helper/blob/master/src/test/java/com/ciaoshen/leetcode/util/TreeNodeTest.java Seems you establish the tree structure in setUpBeforeClass() function, do we have to use the same idea to deal this one?
Since I've created an solution1 class to implement solution interface which takes TreeNode class param, but when I went to Tester.java part tried to write test case with TreeNode, how do I declare the TreeNode structure
For example, if I want to give a binary tree [3,9,20,null,null,15,7] as input ()
/** Initialize test cases */ @Parameters public static Collection<Object[]> testcases() { return Arrays.asList(new Object[][]{ {[3,9,20,null,null,15,7], 3} // test case 1 (init parameters below: {para1, para2, expected}) }); }
This shows
error: illegal start of expression
exceptionHow do you guys deal with leetcode structure in Tester.java