test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java

Fri, 18 Oct 2013 16:34:42 -0700

author
bpatel
date
Fri, 18 Oct 2013 16:34:42 -0700
changeset 2147
130b8c0e570e
parent 2101
933ba3f81a87
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8026567: Use meaningful style names for strong and italic styles.
Reviewed-by: jjg

duke@1 1 /*
bpatel@2035 2 * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
duke@1 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 4 *
duke@1 5 * This code is free software; you can redistribute it and/or modify it
duke@1 6 * under the terms of the GNU General Public License version 2 only, as
duke@1 7 * published by the Free Software Foundation.
duke@1 8 *
duke@1 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@1 13 * accompanied this code).
duke@1 14 *
duke@1 15 * You should have received a copy of the GNU General Public License version
duke@1 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@1 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 18 *
ohair@554 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@554 20 * or visit www.oracle.com if you need additional information or have any
ohair@554 21 * questions.
duke@1 22 */
duke@1 23
duke@1 24 /*
duke@1 25 * @test
bpatel@2147 26 * @bug 4973609 8015249 8025633 8026567
duke@1 27 * @summary Make sure that annotation types with 0 members does not have
duke@1 28 * extra HR tags.
duke@1 29 * @author jamieh
duke@1 30 * @library ../lib/
bpatel@2035 31 * @build JavadocTester TestAnnotationTypes
duke@1 32 * @run main TestAnnotationTypes
duke@1 33 */
duke@1 34
duke@1 35 public class TestAnnotationTypes extends JavadocTester {
duke@1 36
duke@1 37 //Test information.
bpatel@2035 38 private static final String BUG_ID = "4973609-8015249";
duke@1 39
duke@1 40 //Javadoc arguments.
duke@1 41 private static final String[] ARGS = new String[] {
duke@1 42 "-d", BUG_ID, "-sourcepath", SRC_DIR, "-source", "1.5", "pkg"
duke@1 43 };
duke@1 44
duke@1 45 //Input for string search tests.
bpatel@2035 46 private static final String[][] TEST = {
bpatel@2035 47 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
bpatel@2101 48 "<li>Summary:&nbsp;</li>" + NL + "<li><a href=\"#annotation.type." +
bpatel@2101 49 "field.summary\">Field</a>&nbsp;|&nbsp;</li>"},
bpatel@2035 50 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
bpatel@2101 51 "<li>Detail:&nbsp;</li>" + NL + "<li><a href=\"#annotation.type." +
bpatel@2101 52 "field.detail\">Field</a>&nbsp;|&nbsp;</li>"},
bpatel@2035 53 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
bpatel@2035 54 "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->"},
bpatel@2035 55 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
bpatel@2035 56 "<h3>Field Summary</h3>"},
bpatel@2035 57 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
bpatel@2147 58 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../" +
bpatel@2035 59 "pkg/AnnotationTypeField.html#DEFAULT_NAME\">DEFAULT_NAME</a></span>" +
bpatel@2035 60 "</code>&nbsp;</td>"},
bpatel@2035 61 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
bpatel@2035 62 "<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->"},
bpatel@2035 63 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
bpatel@2035 64 "<h4>DEFAULT_NAME</h4>" + NL + "<pre>public static final&nbsp;java." +
bpatel@2035 65 "lang.String&nbsp;DEFAULT_NAME</pre>"},
bpatel@2035 66 {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
bpatel@2035 67 "<li>Summary:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>"},
bpatel@2035 68 {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
bpatel@2035 69 "<li>Detail:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>"},
bpatel@2035 70 };
duke@1 71 private static final String[][] NEGATED_TEST = {
duke@1 72 {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
duke@1 73 "<HR>" + NL + NL + "<P>" + NL + NL + "<P>" +
duke@1 74 "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>"}
duke@1 75 };
duke@1 76
duke@1 77 /**
duke@1 78 * The entry point of the test.
duke@1 79 * @param args the array of command line arguments.
duke@1 80 */
duke@1 81 public static void main(String[] args) {
duke@1 82 TestAnnotationTypes tester = new TestAnnotationTypes();
duke@1 83 run(tester, ARGS, TEST, NEGATED_TEST);
duke@1 84 tester.printSummary();
duke@1 85 }
duke@1 86
duke@1 87 /**
duke@1 88 * {@inheritDoc}
duke@1 89 */
duke@1 90 public String getBugId() {
duke@1 91 return BUG_ID;
duke@1 92 }
duke@1 93
duke@1 94 /**
duke@1 95 * {@inheritDoc}
duke@1 96 */
duke@1 97 public String getBugName() {
duke@1 98 return getClass().getName();
duke@1 99 }
duke@1 100 }

mercurial