< prev index next >

test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java

Print this page




 180 
 181     @Test
 182     public void testLinkSource() {
 183         javadoc("-d", "out-9",
 184                 "-linksource",
 185                 "-javafx",
 186                 "--disable-javafx-strict-checks",
 187                 "-sourcepath", testSrc,
 188                 "-package",
 189                 "linksource");
 190         checkExit(Exit.OK);
 191         checkLinks();
 192         checkOutput("linksource/AnnotationTypeField.html", true,
 193                 "<pre>@Documented\npublic @interface <a href="
 194                 + "\"../src-html/linksource/AnnotationTypeField.html#line.31\">"
 195                 + "AnnotationTypeField</a></pre>",
 196                 "<h3>DEFAULT_NAME</h3>\n"
 197                 + "<a id=\"DEFAULT_NAME\">\n"
 198                 + "<!--   -->\n"
 199                 + "</a>\n"
 200                 + "<pre>static final&nbsp;java.lang.String&nbsp;"
 201                 + "<a href=\"../src-html/linksource/AnnotationTypeField.html#line.32\">"
 202                 + "DEFAULT_NAME</a></pre>",
 203                 "<h3>name</h3>\n"
 204                 + "<a id=\"name()\">\n"
 205                 + "<!--   -->\n"
 206                 + "</a>\n"
 207                 + "<pre>java.lang.String&nbsp;<a href="
 208                 + "\"../src-html/linksource/AnnotationTypeField.html#line.34\">name</a></pre>");

 209 
 210         checkOutput("src-html/linksource/AnnotationTypeField.html", true,
 211                 "<title>Source code</title>",
 212                 "<span class=\"sourceLineNo\">031</span><a id=\"line.31\">"
 213                 + "@Documented public @interface AnnotationTypeField {</a>");
 214 
 215         checkOutput("linksource/Properties.html", true,
 216                 "<pre>public class <a href=\"../src-html/linksource/Properties.html#line.29\">"
 217                 + "Properties</a>",
 218                 "<pre>public&nbsp;java.lang.Object <a href="
 219                 + "\"../src-html/linksource/Properties.html#line.31\">someProperty</a></pre>",
 220                 "<pre class=\"methodSignature\">public&nbsp;java.lang.Object&nbsp;<a href="
 221                 + "\"../src-html/linksource/Properties.html#line.31\">someProperty</a>()</pre>");
 222 
 223         checkOutput("src-html/linksource/Properties.html", true,
 224                 "<title>Source code</title>",
 225                 "<span class=\"sourceLineNo\">031</span><a id=\"line.31\">    "
 226                 + "public Object someProperty() {</a>");
 227 
 228         checkOutput("linksource/SomeClass.html", true,
 229                 "<pre>public class <a href=\"../src-html/linksource/SomeClass.html#line.29\">"
 230                 + "SomeClass</a>\nextends java.lang.Object</pre>",
 231                 "<pre>public&nbsp;int <a href=\"../src-html/linksource/SomeClass.html#line.31\">"
 232                 + "field</a></pre>",
 233                 "<pre>public&nbsp;<a href=\"../src-html/linksource/SomeClass.html#line.33\">"
 234                 + "SomeClass</a>()</pre>",
 235                 "<pre class=\"methodSignature\">public&nbsp;int&nbsp;<a href=\"../src-html/linksource/SomeClass.html#line.36\">"
 236                 + "method</a>()</pre>");



 237 
 238         checkOutput("src-html/linksource/SomeClass.html", true,
 239                 "<title>Source code</title>",
 240                 "<span class=\"sourceLineNo\">029</span><a id=\"line.29\">"
 241                 + "public class SomeClass {</a>",
 242                 "<span class=\"sourceLineNo\">031</span><a id=\"line.31\">    "
 243                 + "public int field;</a>",
 244                 "<span class=\"sourceLineNo\">033</span><a id=\"line.33\">    "
 245                 + "public SomeClass() {</a>",
 246                 "<span class=\"sourceLineNo\">036</span><a id=\"line.36\">    "
 247                 + "public int method() {</a>");
 248 
 249         checkOutput("linksource/SomeEnum.html", true,
 250                 "<pre>public static final&nbsp;<a href=\"SomeEnum.html\" "
 251                 + "title=\"enum in linksource\">SomeEnum</a> <a href="
 252                 + "\"../src-html/linksource/SomeEnum.html#line.29\">VALUE1</a></pre>",
 253                 "<pre>public static final&nbsp;<a href=\"SomeEnum.html\" "
 254                 + "title=\"enum in linksource\">SomeEnum</a> <a href="
 255                 + "\"../src-html/linksource/SomeEnum.html#line.30\">VALUE2</a></pre>");


 256 
 257         checkOutput("src-html/linksource/SomeEnum.html", true,
 258                 "<span class=\"sourceLineNo\">029</span><a id=\"line.29\">    VALUE1,</a>",
 259                 "<span class=\"sourceLineNo\">030</span><a id=\"line.30\">    VALUE2</a>");
 260     }
 261 
 262     @Test
 263     public void testNoQualifier() {
 264         javadoc("-d", "out-10",
 265                 "-noqualifier", "pkg",
 266                 "-sourcepath", testSrc,
 267                 "pkg", "deprecated");
 268         checkExit(Exit.OK);
 269 
 270         checkOutput("pkg/Foo.html", true,
 271                 "<div class=\"inheritance\">Foo</div>");
 272         checkOutput("deprecated/Foo.html", true,
 273                 "<div class=\"inheritance\">deprecated.Foo</div>");
 274 
 275         javadoc("-d", "out-10a",
 276                 "-noqualifier", "all",
 277                 "-sourcepath", testSrc,
 278                 "pkg", "deprecated");
 279         checkExit(Exit.OK);


 180 
 181     @Test
 182     public void testLinkSource() {
 183         javadoc("-d", "out-9",
 184                 "-linksource",
 185                 "-javafx",
 186                 "--disable-javafx-strict-checks",
 187                 "-sourcepath", testSrc,
 188                 "-package",
 189                 "linksource");
 190         checkExit(Exit.OK);
 191         checkLinks();
 192         checkOutput("linksource/AnnotationTypeField.html", true,
 193                 "<pre>@Documented\npublic @interface <a href="
 194                 + "\"../src-html/linksource/AnnotationTypeField.html#line.31\">"
 195                 + "AnnotationTypeField</a></pre>",
 196                 "<h3>DEFAULT_NAME</h3>\n"
 197                 + "<a id=\"DEFAULT_NAME\">\n"
 198                 + "<!--   -->\n"
 199                 + "</a>\n"
 200                 + "<div class=\"memberSignature\"><span class=\"modifiers\">static final</span>&nbsp;"
 201                 + "<span class=\"returnType\">java.lang.String</span>&nbsp;<span class=\"memberName\">"
 202                 + "<a href=\"../src-html/linksource/AnnotationTypeField.html#line.32\">DEFAULT_NAME</a></span></div>",
 203                 "<h3>name</h3>\n"
 204                 + "<a id=\"name()\">\n"
 205                 + "<!--   -->\n"
 206                 + "</a>\n"
 207                 + "<div class=\"memberSignature\"><span class=\"returnType\">java.lang.String</span>&nbsp;"
 208                 + "<span class=\"memberName\"><a href=\"../src-html/linksource/AnnotationTypeField.html#line.34\">"
 209                 + "name</a></span></div>");
 210 
 211         checkOutput("src-html/linksource/AnnotationTypeField.html", true,
 212                 "<title>Source code</title>",
 213                 "<span class=\"sourceLineNo\">031</span><a id=\"line.31\">"
 214                 + "@Documented public @interface AnnotationTypeField {</a>");
 215 
 216         checkOutput("linksource/Properties.html", true,
 217                 "<pre>public class <a href=\"../src-html/linksource/Properties.html#line.29\">"
 218                 + "Properties</a>",
 219                 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span>&nbsp;"
 220                 + "<span class=\"returnType\">java.lang.Object</span>&nbsp;<span class=\"memberName\">"
 221                 + "<a href=\"../src-html/linksource/Properties.html#line.31\">someProperty</a></span></div>");

 222 
 223         checkOutput("src-html/linksource/Properties.html", true,
 224                 "<title>Source code</title>",
 225                 "<span class=\"sourceLineNo\">031</span><a id=\"line.31\">    "
 226                 + "public Object someProperty() {</a>");
 227 
 228         checkOutput("linksource/SomeClass.html", true,
 229                 "<pre>public class <a href=\"../src-html/linksource/SomeClass.html#line.29\">"
 230                 + "SomeClass</a>\nextends java.lang.Object</pre>",
 231                 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span>&nbsp;"
 232                 + "<span class=\"returnType\">int</span>&nbsp;<span class=\"memberName\">"
 233                 + "<a href=\"../src-html/linksource/SomeClass.html#line.31\">field</a></span></div>",
 234                 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span>&nbsp;"
 235                 + "<span class=\"memberName\"><a href=\"../src-html/linksource/SomeClass.html#line.33\">"
 236                 + "SomeClass</a></span>()</div>",
 237                 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span>&nbsp;"
 238                 + "<span class=\"returnType\">int</span>&nbsp;<span class=\"memberName\">"
 239                 + "<a href=\"../src-html/linksource/SomeClass.html#line.36\">method</a></span>()</div>");
 240 
 241         checkOutput("src-html/linksource/SomeClass.html", true,
 242                 "<title>Source code</title>",
 243                 "<span class=\"sourceLineNo\">029</span><a id=\"line.29\">"
 244                 + "public class SomeClass {</a>",
 245                 "<span class=\"sourceLineNo\">031</span><a id=\"line.31\">    "
 246                 + "public int field;</a>",
 247                 "<span class=\"sourceLineNo\">033</span><a id=\"line.33\">    "
 248                 + "public SomeClass() {</a>",
 249                 "<span class=\"sourceLineNo\">036</span><a id=\"line.36\">    "
 250                 + "public int method() {</a>");
 251 
 252         checkOutput("linksource/SomeEnum.html", true,
 253                 "<div class=\"memberSignature\"><span class=\"modifiers\">public static final</span>&nbsp;"
 254                 + "<span class=\"returnType\"><a href=\"SomeEnum.html\" title=\"enum in linksource\">"
 255                 + "SomeEnum</a></span>&nbsp;<span class=\"memberName\">"
 256                 + "<a href=\"../src-html/linksource/SomeEnum.html#line.29\">VALUE1</a></span></div>",
 257                 "<div class=\"memberSignature\"><span class=\"modifiers\">public static final</span>&nbsp;"
 258                 + "<span class=\"returnType\"><a href=\"SomeEnum.html\" title=\"enum in linksource\">"
 259                 + "SomeEnum</a></span>&nbsp;<span class=\"memberName\">"
 260                 + "<a href=\"../src-html/linksource/SomeEnum.html#line.30\">VALUE2</a></span></div>");
 261 
 262         checkOutput("src-html/linksource/SomeEnum.html", true,
 263                 "<span class=\"sourceLineNo\">029</span><a id=\"line.29\">    VALUE1,</a>",
 264                 "<span class=\"sourceLineNo\">030</span><a id=\"line.30\">    VALUE2</a>");
 265     }
 266 
 267     @Test
 268     public void testNoQualifier() {
 269         javadoc("-d", "out-10",
 270                 "-noqualifier", "pkg",
 271                 "-sourcepath", testSrc,
 272                 "pkg", "deprecated");
 273         checkExit(Exit.OK);
 274 
 275         checkOutput("pkg/Foo.html", true,
 276                 "<div class=\"inheritance\">Foo</div>");
 277         checkOutput("deprecated/Foo.html", true,
 278                 "<div class=\"inheritance\">deprecated.Foo</div>");
 279 
 280         javadoc("-d", "out-10a",
 281                 "-noqualifier", "all",
 282                 "-sourcepath", testSrc,
 283                 "pkg", "deprecated");
 284         checkExit(Exit.OK);
< prev index next >