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

@ -27,32 +27,26 @@
* @summary Make sure that annotations types with optional elements have
* element headers
* @author Mahmood Ali
* @library ../lib/
* @library ../lib
* @build JavadocTester
* @build TestAnnotationOptional
* @run main TestAnnotationOptional
*/
public class TestAnnotationOptional extends JavadocTester {
//Javadoc arguments.
private static final String[] ARGS = new String[] {
"-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg"
};
//Input for string search tests.
private static final String[][] TEST = {
{ "pkg/AnnotationOptional.html",
"<a name=\"annotation.type.element.detail\">"
}
};
/**
* 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 {
TestAnnotationOptional tester = new TestAnnotationOptional();
tester.run(ARGS, TEST, NO_TEST);
tester.printSummary();
tester.runTests();
}
@Test
void test() {
javadoc("-d", "out",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/AnnotationOptional.html", true,
"<a name=\"annotation.type.element.detail\">");
}
}