/** * Finds the path to a test. Returns the index of the test in its * parent test suite. */ public int findTest(Test target, Test node, Vector path) { if (target.equals(node)) return 0; TestSuite suite= isTestSuite(node); for (int i= 0; i < getChildCount(node); i++) { Test t= suite.testAt(i); int index= findTest(target, t, path); if (index >= 0) { path.insertElementAt(node, 0); if (path.size() == 1) return i; return index; } } return -1; } /**