test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java
changeset 49139 771616d26ca1
parent 48654 36f58bd6269f
child 53097 2e82ca64b25d
equal deleted inserted replaced
49138:67912cbf784a 49139:771616d26ca1
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug      4973609 8015249 8025633 8026567 6469561 8071982 8162363
    26  * @bug      4973609 8015249 8025633 8026567 6469561 8071982 8162363 8182765
    27  * @summary  Make sure that annotation types with 0 members does not have
    27  * @summary  Make sure that annotation types with 0 members does not have
    28  *           extra HR tags.
    28  *           extra HR tags.
    29  * @author   jamieh
    29  * @author   jamieh
    30  * @library  ../lib
    30  * @library  ../lib
    31  * @modules jdk.javadoc/jdk.javadoc.internal.tool
    31  * @modules jdk.javadoc/jdk.javadoc.internal.tool
    70                 + "<li>Field&nbsp;|&nbsp;</li>");
    70                 + "<li>Field&nbsp;|&nbsp;</li>");
    71 
    71 
    72         checkOutput("pkg/AnnotationType.html", true,
    72         checkOutput("pkg/AnnotationType.html", true,
    73                     "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->",
    73                     "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->",
    74                     "<ul class=\"blockList\">",
    74                     "<ul class=\"blockList\">",
    75                     "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">",
    75                     "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">",
    76                     "<!--   -->",
    76                     "<!--   -->",
    77                     "</a>",
    77                     "</a>",
    78                     "<h3>Element Detail</h3>",
    78                     "<h3>Element Detail</h3>",
    79                     "<a name=\"value--\">",
    79                     "<a id=\"value()\">",
    80                     "<!--   -->",
    80                     "<!--   -->",
    81                     "</a>",
    81                     "</a>",
    82                     "<ul class=\"blockListLast\">",
    82                     "<ul class=\"blockListLast\">",
    83                     "<li class=\"blockList\">",
    83                     "<li class=\"blockList\">",
    84                     "<h4>value</h4>",
    84                     "<h4>value</h4>",
    87         checkOutput("pkg/AnnotationType.html", false,
    87         checkOutput("pkg/AnnotationType.html", false,
    88                 "<HR>\n\n"
    88                 "<HR>\n\n"
    89                 + "<P>\n\n"
    89                 + "<P>\n\n"
    90                 + "<P>"
    90                 + "<P>"
    91                 + "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>");
    91                 + "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>");
       
    92     }
    92 
    93 
       
    94     @Test
       
    95     void testLinkSource() {
    93         javadoc("-d", "out-2",
    96         javadoc("-d", "out-2",
    94                 "-linksource",
    97                 "-linksource",
    95                 "-sourcepath", testSrc,
    98                 "-sourcepath", testSrc,
    96                 "pkg");
    99                 "pkg");
    97         checkExit(Exit.OK);
   100         checkExit(Exit.OK);
   110 
   113 
   111         checkOutput("pkg/AnnotationTypeField.html", true,
   114         checkOutput("pkg/AnnotationTypeField.html", true,
   112                 "public @interface <a href=\"../src-html/pkg/AnnotationTypeField.html#line.31"
   115                 "public @interface <a href=\"../src-html/pkg/AnnotationTypeField.html#line.31"
   113                 + "\">AnnotationTypeField</a></pre>");
   116                 + "\">AnnotationTypeField</a></pre>");
   114     }
   117     }
       
   118 
       
   119     @Test
       
   120     void test_html4() {
       
   121         javadoc("-d", "out-html4",
       
   122                 "-html4",
       
   123                 "-sourcepath", testSrc,
       
   124                 "pkg");
       
   125         checkExit(Exit.OK);
       
   126         checkOutput("pkg/AnnotationType.html", true,
       
   127                 "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">",
       
   128                 "<a name=\"value--\">");
   115 }
   129 }
       
   130 }