8038730: Clean up the way JavadocTester is invoked, and checks for errors

Reviewed-by: ksrini, sogoel, bpatel
This commit is contained in:
Jonathan Gibbons 2014-05-09 15:37:12 -07:00
parent 756eae6492
commit caa2209663
144 changed files with 7277 additions and 9513 deletions

View file

@ -26,29 +26,25 @@
* @bug 4197513
* @summary Javadoc does not process base class.
* @author jamieh
* @library ../lib/
* @library ../lib
* @build BaseClass
* @build JavadocTester
* @build TestBaseClass
* @run main TestBaseClass
*/
public class TestBaseClass extends JavadocTester {
private static final String[] ARGS =
new String[] {
"-sourcepath", SRC_DIR,
"-docletpath", SRC_DIR, "-doclet", "BaseClass",
SRC_DIR + "/Bar.java", "baz"};
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String[] args) {
public static void main(String... args) throws Exception {
TestBaseClass tester = new TestBaseClass();
if (tester.run(ARGS, NO_TEST, NO_TEST) != 0) {
throw new Error("Javadoc failed to execute.");
}
tester.runTests();
}
@Test
void test() {
javadoc("-sourcepath", testSrc,
"-docletpath", testSrc,
"-doclet", "BaseClass",
testSrc("Bar.java"), "baz");
checkExit(Exit.OK);
}
}