< prev index next >

test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java

Print this page




  41         TestAnnotationTypes tester = new TestAnnotationTypes();
  42         tester.runTests();
  43     }
  44 
  45     @Test
  46     public void test() {
  47         javadoc("-d", "out-1",
  48                 "-sourcepath", testSrc,
  49                 "pkg");
  50         checkExit(Exit.OK);
  51 
  52         checkOutput("pkg/AnnotationTypeField.html", true,
  53                 "<li>Summary:&nbsp;</li>\n"
  54                 + "<li><a href=\"#annotation.type."
  55                 + "field.summary\">Field</a>&nbsp;|&nbsp;</li>",
  56                 "<li>Detail:&nbsp;</li>\n"
  57                 + "<li><a href=\"#annotation.type."
  58                 + "field.detail\">Field</a>&nbsp;|&nbsp;</li>",
  59                 "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->",
  60                 "<h2>Field Summary</h2>",
  61                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#DEFAULT_NAME\">DEFAULT_NAME</a></span>"
  62                 + "</code></th>",
  63                 "<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->",
  64                 "<h3>DEFAULT_NAME</h3>\n"
  65                 + "<a id=\"DEFAULT_NAME\">\n"
  66                 + "<!--   -->\n"
  67                 + "</a>\n"
  68                 + "<pre>static final&nbsp;java."
  69                 + "lang.String&nbsp;DEFAULT_NAME</pre>");

  70 
  71         checkOutput("pkg/AnnotationType.html", true,
  72                 "<li>Summary:&nbsp;</li>\n"
  73                 + "<li>Field&nbsp;|&nbsp;</li>",
  74                 "<li>Detail:&nbsp;</li>\n"
  75                 + "<li>Field&nbsp;|&nbsp;</li>");
  76 
  77         checkOutput("pkg/AnnotationType.html", true,
  78                     "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->",
  79                     "<ul class=\"blockList\">",
  80                     "<li class=\"blockList\">",
  81                     "<section class=\"memberDetails\">",
  82                     "<h2>Element Details</h2>",
  83                     "<a id=\"annotation.type.element.detail\">",
  84                     "<!--   -->",
  85                     "</a>",
  86                     "<ul class=\"blockList\">",
  87                     "<li class=\"blockListLast\">",
  88                     "<section class=\"detail\">",
  89                     "<h3>value</h3>",
  90                     "<a id=\"value()\">",
  91                     "<!--   -->",
  92                     "</a>",
  93                     "<pre>int&nbsp;value</pre>");

  94 
  95         checkOutput("pkg/AnnotationType.html", false,
  96                 "<HR>\n\n"
  97                 + "<P>\n\n"
  98                 + "<P>"
  99                 + "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>");
 100     }
 101 
 102     @Test
 103     public void testLinkSource() {
 104         javadoc("-d", "out-2",
 105                 "-linksource",
 106                 "-sourcepath", testSrc,
 107                 "pkg");
 108         checkExit(Exit.OK);
 109 
 110         checkOutput("src-html/pkg/AnnotationType.html", true,
 111                 "<title>Source code</title>",
 112                 "@Documented public @interface AnnotationType {");
 113 


  41         TestAnnotationTypes tester = new TestAnnotationTypes();
  42         tester.runTests();
  43     }
  44 
  45     @Test
  46     public void test() {
  47         javadoc("-d", "out-1",
  48                 "-sourcepath", testSrc,
  49                 "pkg");
  50         checkExit(Exit.OK);
  51 
  52         checkOutput("pkg/AnnotationTypeField.html", true,
  53                 "<li>Summary:&nbsp;</li>\n"
  54                 + "<li><a href=\"#annotation.type."
  55                 + "field.summary\">Field</a>&nbsp;|&nbsp;</li>",
  56                 "<li>Detail:&nbsp;</li>\n"
  57                 + "<li><a href=\"#annotation.type."
  58                 + "field.detail\">Field</a>&nbsp;|&nbsp;</li>",
  59                 "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->",
  60                 "<h2>Field Summary</h2>",
  61                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#DEFAULT_NAME\">DEFAULT_NAME</a></span>"
  62                 + "</code></th>",
  63                 "<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->",
  64                 "<h3>DEFAULT_NAME</h3>\n"
  65                 + "<a id=\"DEFAULT_NAME\">\n"
  66                 + "<!--   -->\n"
  67                 + "</a>\n"
  68                 + "<div class=\"memberSignature\"><span class=\"modifiers\">static final</span>&nbsp;"
  69                 + "<span class=\"returnType\">java.lang.String</span>&nbsp;"
  70                 + "<span class=\"memberName\">DEFAULT_NAME</span></div>\n");
  71 
  72         checkOutput("pkg/AnnotationType.html", true,
  73                 "<li>Summary:&nbsp;</li>\n"
  74                 + "<li>Field&nbsp;|&nbsp;</li>",
  75                 "<li>Detail:&nbsp;</li>\n"
  76                 + "<li>Field&nbsp;|&nbsp;</li>");
  77 
  78         checkOutput("pkg/AnnotationType.html", true,
  79                     "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->",
  80                     "<ul class=\"blockList\">",
  81                     "<li class=\"blockList\">",
  82                     "<section class=\"memberDetails\">",
  83                     "<h2>Element Details</h2>",
  84                     "<a id=\"annotation.type.element.detail\">",
  85                     "<!--   -->",
  86                     "</a>",
  87                     "<ul class=\"blockList\">",
  88                     "<li class=\"blockListLast\">",
  89                     "<section class=\"detail\">",
  90                     "<h3>value</h3>",
  91                     "<a id=\"value()\">",
  92                     "<!--   -->",
  93                     "</a>",
  94                     "<div class=\"memberSignature\"><span class=\"returnType\">int</span>"
  95                     + "&nbsp;<span class=\"memberName\">value</span></div>");
  96 
  97         checkOutput("pkg/AnnotationType.html", false,
  98                 "<HR>\n\n"
  99                 + "<P>\n\n"
 100                 + "<P>"
 101                 + "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>");
 102     }
 103 
 104     @Test
 105     public void testLinkSource() {
 106         javadoc("-d", "out-2",
 107                 "-linksource",
 108                 "-sourcepath", testSrc,
 109                 "pkg");
 110         checkExit(Exit.OK);
 111 
 112         checkOutput("src-html/pkg/AnnotationType.html", true,
 113                 "<title>Source code</title>",
 114                 "@Documented public @interface AnnotationType {");
 115 
< prev index next >