langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java
changeset 24072 e7549dcbc4af
parent 24065 fc4022e50129
child 24399 af1a0220d0fa
equal deleted inserted replaced
24071:b0845717434e 24072:e7549dcbc4af
    32  * @run main TestAnnotationTypes
    32  * @run main TestAnnotationTypes
    33  */
    33  */
    34 
    34 
    35 public class TestAnnotationTypes extends JavadocTester {
    35 public class TestAnnotationTypes extends JavadocTester {
    36 
    36 
    37     //Test information.
       
    38     private static final String BUG_ID = "4973609-8015249";
       
    39 
       
    40     //Javadoc arguments.
    37     //Javadoc arguments.
    41     private static final String[] ARGS = new String[] {
    38     private static final String[] ARGS = new String[] {
    42         "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
    39         "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg"
    43     };
    40     };
    44 
    41 
    45     //Input for string search tests.
    42     //Input for string search tests.
    46     private static final String[][] TEST = {
    43     private static final String[][] TEST = {
    47         {BUG_ID + "/pkg/AnnotationTypeField.html",
    44         { "pkg/AnnotationTypeField.html",
    48             "<li>Summary:&nbsp;</li>\n" +
    45             "<li>Summary:&nbsp;</li>\n" +
    49             "<li><a href=\"#annotation.type." +
    46             "<li><a href=\"#annotation.type." +
    50             "field.summary\">Field</a>&nbsp;|&nbsp;</li>"},
    47             "field.summary\">Field</a>&nbsp;|&nbsp;</li>"},
    51         {BUG_ID + "/pkg/AnnotationTypeField.html",
    48         { "pkg/AnnotationTypeField.html",
    52             "<li>Detail:&nbsp;</li>\n" +
    49             "<li>Detail:&nbsp;</li>\n" +
    53             "<li><a href=\"#annotation.type." +
    50             "<li><a href=\"#annotation.type." +
    54             "field.detail\">Field</a>&nbsp;|&nbsp;</li>"},
    51             "field.detail\">Field</a>&nbsp;|&nbsp;</li>"},
    55         {BUG_ID + "/pkg/AnnotationTypeField.html",
    52         { "pkg/AnnotationTypeField.html",
    56             "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->"},
    53             "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->"},
    57         {BUG_ID + "/pkg/AnnotationTypeField.html",
    54         { "pkg/AnnotationTypeField.html",
    58             "<h3>Field Summary</h3>"},
    55             "<h3>Field Summary</h3>"},
    59         {BUG_ID + "/pkg/AnnotationTypeField.html",
    56         { "pkg/AnnotationTypeField.html",
    60             "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../" +
    57             "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../" +
    61             "pkg/AnnotationTypeField.html#DEFAULT_NAME\">DEFAULT_NAME</a></span>" +
    58             "pkg/AnnotationTypeField.html#DEFAULT_NAME\">DEFAULT_NAME</a></span>" +
    62             "</code>&nbsp;</td>"},
    59             "</code>&nbsp;</td>"},
    63         {BUG_ID + "/pkg/AnnotationTypeField.html",
    60         { "pkg/AnnotationTypeField.html",
    64             "<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->"},
    61             "<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->"},
    65         {BUG_ID + "/pkg/AnnotationTypeField.html",
    62         { "pkg/AnnotationTypeField.html",
    66             "<h4>DEFAULT_NAME</h4>\n" +
    63             "<h4>DEFAULT_NAME</h4>\n" +
    67             "<pre>public static final&nbsp;java." +
    64             "<pre>public static final&nbsp;java." +
    68             "lang.String&nbsp;DEFAULT_NAME</pre>"},
    65             "lang.String&nbsp;DEFAULT_NAME</pre>"},
    69         {BUG_ID + "/pkg/AnnotationType.html",
    66         { "pkg/AnnotationType.html",
    70             "<li>Summary:&nbsp;</li>\n" +
    67             "<li>Summary:&nbsp;</li>\n" +
    71             "<li>Field&nbsp;|&nbsp;</li>"},
    68             "<li>Field&nbsp;|&nbsp;</li>"},
    72         {BUG_ID + "/pkg/AnnotationType.html",
    69         { "pkg/AnnotationType.html",
    73             "<li>Detail:&nbsp;</li>\n" +
    70             "<li>Detail:&nbsp;</li>\n" +
    74             "<li>Field&nbsp;|&nbsp;</li>"},
    71             "<li>Field&nbsp;|&nbsp;</li>"},
    75     };
    72     };
    76     private static final String[][] NEGATED_TEST = {
    73     private static final String[][] NEGATED_TEST = {
    77         {BUG_ID + "/pkg/AnnotationType.html",
    74         { "pkg/AnnotationType.html",
    78             "<HR>\n\n" +
    75             "<HR>\n\n" +
    79             "<P>\n\n" +
    76             "<P>\n\n" +
    80             "<P>" +
    77             "<P>" +
    81             "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>"}
    78             "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>"}
    82     };
    79     };
    88     public static void main(String[] args) {
    85     public static void main(String[] args) {
    89         TestAnnotationTypes tester = new TestAnnotationTypes();
    86         TestAnnotationTypes tester = new TestAnnotationTypes();
    90         tester.run(ARGS, TEST, NEGATED_TEST);
    87         tester.run(ARGS, TEST, NEGATED_TEST);
    91         tester.printSummary();
    88         tester.printSummary();
    92     }
    89     }
    93 
       
    94     /**
       
    95      * {@inheritDoc}
       
    96      */
       
    97     public String getBugId() {
       
    98         return BUG_ID;
       
    99     }
       
   100 
       
   101     /**
       
   102      * {@inheritDoc}
       
   103      */
       
   104     public String getBugName() {
       
   105         return getClass().getName();
       
   106     }
       
   107 }
    90 }