提交 2a7b3f1a 编写于 作者: B bpatel

8182765: HTML5 must be the default javadoc codegen mode in the near future

Reviewed-by: jjg
上级 6cdf2492
......@@ -307,8 +307,7 @@ public class HtmlConfiguration extends BaseConfiguration {
}
if (htmlVersion == null) {
reporter.print(WARNING, getText("doclet.HTML_version_not_specified", helpfile));
htmlVersion = HtmlVersion.HTML4;
htmlVersion = HtmlVersion.HTML5;
}
// check if helpfile exists
......@@ -658,6 +657,7 @@ public class HtmlConfiguration extends BaseConfiguration {
new Option(resources, "-html4") {
@Override
public boolean process(String opt, List<String> args) {
reporter.print(WARNING, getText("doclet.HTML_4_specified", helpfile));
htmlVersion = HtmlVersion.HTML4;
return true;
}
......
......@@ -445,9 +445,8 @@ doclet.usage.xdoclint-package.description=\
disable checks for the specified packages.
# L10N: do not localize the option names -html4 and -html5
doclet.HTML_version_not_specified=\
You have not specified the version of HTML to use.\n\
The default is currently HTML 4.01, but this will change to HTML5\n\
in a future release. To suppress this warning, please specify the\n\
version of HTML used in your documentation comments and to be\n\
generated by this doclet, using the -html4 or -html5 options.
doclet.HTML_4_specified=\
You have specified the HTML version as HTML 4.01 by using the -html4 option.\n\
The default is currently HTML5 and the support for HTML 4.01 will be removed\n\
in a future release. To suppress this warning, please ensure that any HTML constructs\n\
in your comments are valid in HTML5, and remove the -html4 option.
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4638136 7198273 8025633 8081854
* @bug 4638136 7198273 8025633 8081854 8182765
* @summary Add ability to skip over nav bar for accessibility
* @author dkramer
* @library ../lib
......@@ -46,21 +46,37 @@ public class AccessSkipNav extends JavadocTester {
"p1", "p2");
checkExit(Exit.OK);
// Testing only for the presence of the <a href> and <a name>
// Testing only for the presence of the <a href> and <a id>
checkOutput("p1/C1.html", true,
// Top navbar <a href>
"<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
// Top navbar <a name>
"<a name=\"skip.navbar.top\">\n"
"<a id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</a>",
// Bottom navbar <a href>
"<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
// Bottom navbar <a name>
"<a name=\"skip.navbar.bottom\">\n"
"<a id=\"skip.navbar.bottom\">\n"
+ "<!-- -->\n"
+ "</a>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"p1", "p2");
checkExit(Exit.OK);
// Testing only for the presence of <a name>
checkOutput("p1/C1.html", true,
"<a name=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</a>",
"<a name=\"skip.navbar.bottom\">\n"
+ "<!-- -->\n"
+ "</a>");
}
}
/*
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4637604 4775148 8183037
* @bug 4637604 4775148 8183037 8182765
* @summary Test the tables for summary attribute
* @author dkramer
* @library ../lib
......@@ -47,15 +47,29 @@ public class AccessSummary extends JavadocTester {
void testAccessSummary() {
javadoc("-d", "out", "-sourcepath", testSrc, "p1", "p2");
checkExit(Exit.OK);
checkOutput("overview-summary.html", true,
checkSummary(false);
}
@Test
void testAccessSummary_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"p1", "p2");
checkExit(Exit.OK);
checkSummary(true);
}
void checkSummary(boolean found) {
checkOutput("overview-summary.html", found,
"summary=\"Package Summary table, listing packages, and an explanation\"");
// Test that the summary attribute appears
checkOutput("p1/C1.html", true,
// Test that the summary attribute appears or not
checkOutput("p1/C1.html", found,
"summary=\"Constructor Summary table, listing constructors, and an explanation\"");
// Test that the summary attribute appears
checkOutput("constant-values.html", true,
// Test that the summary attribute appears or not
checkOutput("constant-values.html", found,
"summary=\"Constant Field Values table, listing constant fields, and values\"");
}
}
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4034096 4764726 6235799
* @bug 4034096 4764726 6235799 8182765
* @summary Add support for HTML keywords via META tag for
* class and member names to improve API search
* @author dkramer
......@@ -58,28 +58,40 @@ public class MetaTag extends JavadocTester {
checkExit(Exit.OK);
checkOutput("p1/C1.html", true,
"<meta name=\"keywords\" content=\"p1.C1 class\">",
"<meta name=\"keywords\" content=\"field1\">",
"<meta name=\"keywords\" content=\"field2\">",
"<meta name=\"keywords\" content=\"method1()\">",
"<meta name=\"keywords\" content=\"method2()\">");
checkMeta("dc.created", true);
}
checkOutput("p1/package-summary.html", true,
"<meta name=\"keywords\" content=\"p1 package\">");
@Test
void testNoTimestamp() {
javadoc("-d", "out-2",
"-sourcepath", testSrc,
"-notimestamp",
"-doctitle", "Sample Packages",
"p1", "p2");
checkExit(Exit.OK);
checkOutput("overview-summary.html", true,
"<meta name=\"keywords\" content=\"Overview, Sample Packages\">");
// No keywords when -keywords is not used.
checkMeta("dc.created", false);
}
// NOTE: Hopefully, this regression test is not run at midnight. If the output
// was generated yesterday and this test is run today, the test will fail.
checkOutput("overview-summary.html", true,
"<meta name=\"date\" content=\"" + date() + "\">");
@Test
void testStandard_html4() {
javadoc("-d", "out-1-html4",
"-html4",
"-sourcepath", testSrc,
"-keywords",
"-doctitle", "Sample Packages",
"p1", "p2");
checkExit(Exit.OK);
checkMeta("date", true);
}
@Test
void testNoTimestamp() {
javadoc("-d", "out-2",
void testNoTimestamp_html4() {
javadoc("-d", "out-2-html4",
"-html4",
"-sourcepath", testSrc,
"-notimestamp",
"-doctitle", "Sample Packages",
......@@ -87,24 +99,27 @@ public class MetaTag extends JavadocTester {
checkExit(Exit.OK);
// No keywords when -keywords is not used.
checkOutput("p1/C1.html", false,
"<META NAME=\"keywords\" CONTENT=\"p1.C1 class\">",
"<META NAME=\"keywords\" CONTENT=\"field1\">",
"<META NAME=\"keywords\" CONTENT=\"field2\">",
"<META NAME=\"keywords\" CONTENT=\"method1()\">",
"<META NAME=\"keywords\" CONTENT=\"method2()\">");
checkMeta("date", false);
}
checkOutput("p1/package-summary.html", false,
"<META NAME=\"keywords\" CONTENT=\"p1 package\">");
void checkMeta(String metaNameDate, boolean found) {
checkOutput("p1/C1.html", found,
"<meta name=\"keywords\" content=\"p1.C1 class\">",
"<meta name=\"keywords\" content=\"field1\">",
"<meta name=\"keywords\" content=\"field2\">",
"<meta name=\"keywords\" content=\"method1()\">",
"<meta name=\"keywords\" content=\"method2()\">");
checkOutput("p1/package-summary.html", found,
"<meta name=\"keywords\" content=\"p1 package\">");
checkOutput("overview-summary.html", false,
"<META NAME=\"keywords\" CONTENT=\"Overview Summary, Sample Packages\">");
checkOutput("overview-summary.html", found,
"<meta name=\"keywords\" content=\"Overview, Sample Packages\">");
// The date metatag should not show up when -notimestamp is used.
// NOTE: Hopefully, this regression test is not run at midnight. If the output
// was generated yesterday and this test is run today, the test will fail.
checkOutput("overview-summary.html", false,
"<META NAME=\"date\" CONTENT=\"" + date() + "\">");
checkOutput("overview-summary.html", found,
"<meta name=\"" + metaNameDate + "\" content=\"" + date() + "\">");
}
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
......
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4275630 4749453 4625400 4753048 4415270 8074521
* @bug 4275630 4749453 4625400 4753048 4415270 8074521 8182765
* @summary Generated HTML is invalid with frames.
* Displays unnecessary horizontal scroll bars.
* Missing whitespace in DOCTYPE declaration
......@@ -53,26 +53,42 @@ public class ValidHtml extends JavadocTester {
"-sourcepath", testSrc,
"p1", "p2");
checkExit(Exit.OK);
// Test the proper DOCTYPE element are present:
checkOutput("index.html", true, LOOSE);
checkOutput("overview-summary.html", true, LOOSE);
checkOutput("p1/package-summary.html", true, LOOSE);
checkOutput("p1/C.html", true, LOOSE);
checkOutput("overview-frame.html", true, LOOSE);
checkOutput("allclasses-frame.html", true, LOOSE);
checkOutput("p1/package-frame.html", true, LOOSE);
// Test for IFRAME element:
checkOutput("index.html", true,
"<iframe");
// Test the table elements are in the correct order:
checkOutput("p1/package-use.html", true,
"</td>\n"
+ "</tr>");
String HTML5 = "<!DOCTYPE HTML>";
checkValidHTML(HTML5);
}
private static final String LOOSE =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
@Test
void test_html4() {
// Test for all cases except the split index page
javadoc("-d", "out-html4",
"-html4",
"-doctitle", "Document Title",
"-windowtitle", "Window Title",
"-use",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"p1", "p2");
checkExit(Exit.OK);
String HTML4 = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
checkValidHTML(HTML4);
}
void checkValidHTML(String doctype) {
// Test the proper DOCTYPE element are present:
checkOutput("index.html", true, doctype);
checkOutput("overview-summary.html", true, doctype);
checkOutput("p1/package-summary.html", true, doctype);
checkOutput("p1/C.html", true, doctype);
checkOutput("overview-frame.html", true, doctype);
checkOutput("allclasses-frame.html", true, doctype);
checkOutput("p1/package-frame.html", true, doctype);
}
}
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8025633 8025524 8081854 8187521
* @bug 8025633 8025524 8081854 8187521 8182765
* @summary Test for valid name attribute in HTML anchors.
* @author Bhavesh Patel
* @library /tools/lib ../lib
......@@ -33,7 +33,6 @@
*/
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Path;
import java.nio.file.Paths;
......@@ -54,6 +53,7 @@ public class TestAnchorNames extends JavadocTester {
@Test
void testHtml4(Path ignore) {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"-source", "8", //so that '_' can be used as an identifier
"-use",
......@@ -175,7 +175,6 @@ public class TestAnchorNames extends JavadocTester {
"-sourcepath", testSrc,
"-source", "8", //so that '_' can be used as an identifier
"-use",
"-html5",
"pkg1");
checkExit(Exit.OK);
......
/*
* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8025633 8081854
* @bug 8025633 8081854 8182765
* @summary Make sure that annotations types with optional elements have
* element headers
* @author Mahmood Ali
......@@ -47,6 +47,18 @@ public class TestAnnotationOptional extends JavadocTester {
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/AnnotationOptional.html", true,
"<a id=\"annotation.type.element.detail\">");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/AnnotationOptional.html", true,
"<a name=\"annotation.type.element.detail\">");
}
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4973609 8015249 8025633 8026567 6469561 8071982 8162363
* @bug 4973609 8015249 8025633 8026567 6469561 8071982 8162363 8182765
* @summary Make sure that annotation types with 0 members does not have
* extra HR tags.
* @author jamieh
......@@ -72,11 +72,11 @@ public class TestAnnotationTypes extends JavadocTester {
checkOutput("pkg/AnnotationType.html", true,
"<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->",
"<ul class=\"blockList\">",
"<li class=\"blockList\"><a name=\"annotation.type.element.detail\">",
"<li class=\"blockList\"><a id=\"annotation.type.element.detail\">",
"<!-- -->",
"</a>",
"<h3>Element Detail</h3>",
"<a name=\"value--\">",
"<a id=\"value()\">",
"<!-- -->",
"</a>",
"<ul class=\"blockListLast\">",
......@@ -89,7 +89,10 @@ public class TestAnnotationTypes extends JavadocTester {
+ "<P>\n\n"
+ "<P>"
+ "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>");
}
@Test
void testLinkSource() {
javadoc("-d", "out-2",
"-linksource",
"-sourcepath", testSrc,
......@@ -112,4 +115,16 @@ public class TestAnnotationTypes extends JavadocTester {
"public @interface <a href=\"../src-html/pkg/AnnotationTypeField.html#line.31"
+ "\">AnnotationTypeField</a></pre>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/AnnotationType.html", true,
"<li class=\"blockList\"><a name=\"annotation.type.element.detail\">",
"<a name=\"value--\">");
}
}
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4652655 4857717 8025633 8026567 8071982 8164407
* @bug 4652655 4857717 8025633 8026567 8071982 8164407 8182765
* @summary This test verifies that class cross references work properly.
* @author jamieh
* @library ../lib
......@@ -35,6 +35,8 @@
public class TestClassCrossReferences extends JavadocTester {
static final String uri = "http://docs.oracle.com/javase/8/docs/api/";
public static void main(String... args) throws Exception {
TestClassCrossReferences tester = new TestClassCrossReferences();
tester.runTests();
......@@ -42,8 +44,6 @@ public class TestClassCrossReferences extends JavadocTester {
@Test
void test() {
final String uri = "http://docs.oracle.com/javase/8/docs/api/";
javadoc("-d", "out",
"-Xdoclint:none",
"-sourcepath", testSrc,
......@@ -58,7 +58,7 @@ public class TestClassCrossReferences extends JavadocTester {
+ "title=\"class or interface in javax.swing.text\" class=\"externalLink\"><code>Link to AttributeContext innerclass</code></a>",
"<a href=\"" + uri + "java/math/BigDecimal.html?is-external=true\" "
+ "title=\"class or interface in java.math\" class=\"externalLink\"><code>Link to external class BigDecimal</code></a>",
"<a href=\"" + uri + "java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" "
"<a href=\"" + uri + "java/math/BigInteger.html?is-external=true#gcd(java.math.BigInteger)\" "
+ "title=\"class or interface in java.math\" class=\"externalLink\"><code>Link to external member gcd</code></a>",
"<a href=\"" + uri + "javax/tools/SimpleJavaFileObject.html?is-external=true#URI\" "
+ "title=\"class or interface in javax.tools\" class=\"externalLink\"><code>Link to external member URI</code></a>",
......@@ -68,4 +68,18 @@ public class TestClassCrossReferences extends JavadocTester {
+ "</dl>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-Xdoclint:none",
"-sourcepath", testSrc,
"-linkoffline", uri, testSrc,
testSrc("C.java"));
checkExit(Exit.OK);
checkOutput("C.html", true,
"<a href=\"" + uri + "java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" "
+ "title=\"class or interface in java.math\" class=\"externalLink\"><code>Link to external member gcd</code></a>");
}
}
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8163800 8175200 8186332
* @bug 8163800 8175200 8186332 8182765
* @summary The fix for JDK-8072052 shows up other minor incorrect use of styles
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
......@@ -51,11 +51,11 @@ public class TestClassLinks extends JavadocTester {
checkOutput("p/C1.html", true,
"<code><a href=\"C2.html\" title=\"class in p\">C2</a></code>",
"<code><span class=\"memberNameLink\"><a href=\"#C1--\">C1</a></span>()</code>");
"<code><span class=\"memberNameLink\"><a href=\"#%3Cinit%3E()\">C1</a></span>()</code>");
checkOutput("p/C2.html", true,
"<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
"<code><span class=\"memberNameLink\"><a href=\"#C2--\">C2</a></span>()</code>");
"<code><span class=\"memberNameLink\"><a href=\"#%3Cinit%3E()\">C2</a></span>()</code>");
checkOutput("p/C3.html", true,
"<code><a href=\"I1.html\" title=\"interface in p\">I1</a></code>, "
......@@ -63,7 +63,7 @@ public class TestClassLinks extends JavadocTester {
+ "<code><a href=\"I2.html\" title=\"interface in p\">I2</a></code>, "
+ "<code><a href=\"IT1.html\" title=\"interface in p\">IT1</a>&lt;T&gt;</code>, "
+ "<code><a href=\"IT2.html\" title=\"interface in p\">IT2</a>&lt;java.lang.String&gt;</code>",
"<code><span class=\"memberNameLink\"><a href=\"#C3--\">C3</a></span>()</code>");
"<code><span class=\"memberNameLink\"><a href=\"#%3Cinit%3E()\">C3</a></span>()</code>");
checkOutput("p/I1.html", true,
"<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
......@@ -82,7 +82,26 @@ public class TestClassLinks extends JavadocTester {
checkOutput("p/IT2.html", true,
"code><a href=\"C3.html\" title=\"class in p\">C3</a></code>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-Xdoclint:none",
"-sourcepath", testSrc,
"-package",
"p");
checkExit(Exit.OK);
checkOutput("p/C1.html", true,
"<code><span class=\"memberNameLink\"><a href=\"#C1--\">C1</a></span>()</code>");
checkOutput("p/C2.html", true,
"<code><span class=\"memberNameLink\"><a href=\"#C2--\">C2</a></span>()</code>");
checkOutput("p/C3.html", true,
"<code><span class=\"memberNameLink\"><a href=\"#C3--\">C3</a></span>()</code>");
}
}
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8025524 8031625 8081854 8175200 8186332
* @bug 8025524 8031625 8081854 8175200 8186332 8182765
* @summary Test for constructor name which should be a non-qualified name.
* @author Bhavesh Patel
* @library ../lib
......@@ -46,6 +46,57 @@ public class TestConstructors extends JavadocTester {
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/Outer.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"Outer.Inner.html#%3Cinit%3E()\"><code>Inner()</code></a>, \n"
+ "<a href=\"Outer.Inner.html#%3Cinit%3E(int)\"><code>Inner(int)</code></a>, \n"
+ "<a href=\"Outer.Inner.NestedInner.html#%3Cinit%3E()\"><code>NestedInner()</code></a>, \n"
+ "<a href=\"Outer.Inner.NestedInner.html#%3Cinit%3E(int)\"><code>NestedInner(int)</code></a>, \n"
+ "<a href=\"#%3Cinit%3E()\"><code>Outer()</code></a>, \n"
+ "<a href=\"#%3Cinit%3E(int)\"><code>Outer(int)</code></a></dd>",
"Link: <a href=\"Outer.Inner.html#%3Cinit%3E()\"><code>Inner()</code></a>, "
+ "<a href=\"#%3Cinit%3E(int)\"><code>Outer(int)</code></a>, "
+ "<a href=\"Outer.Inner.NestedInner.html#%3Cinit%3E(int)\"><code>NestedInner(int)</code></a>",
"<a href=\"#%3Cinit%3E()\">Outer</a></span>()",
"<a id=\"&lt;init&gt;(int)\">",
"<a href=\"#%3Cinit%3E(int)\">Outer</a></span>&#8203;(int&nbsp;i)",
"<a id=\"&lt;init&gt;(int)\">");
checkOutput("pkg1/Outer.Inner.html", true,
"<a href=\"#%3Cinit%3E()\">Inner</a></span>()",
"<a id=\"&lt;init&gt;()\">",
"<a href=\"#%3Cinit%3E(int)\">Inner</a></span>&#8203;(int&nbsp;i)",
"<a id=\"&lt;init&gt;(int)\">");
checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
"<a href=\"#%3Cinit%3E()\">NestedInner</a></span>()",
"<a id=\"&lt;init&gt;()\">",
"<a href=\"#%3Cinit%3E(int)\">NestedInner</a></span>&#8203;(int&nbsp;i)",
"<a id=\"&lt;init&gt;(int)\">");
checkOutput("pkg1/Outer.Inner.html", false,
"Outer.Inner()",
"Outer.Inner(int)");
checkOutput("pkg1/Outer.Inner.NestedInner.html", false,
"Outer.Inner.NestedInner()",
"Outer.Inner.NestedInner(int)");
checkOutput("pkg1/Outer.html", false,
"<a href=\"Outer.Inner.html#Outer.Inner()\"><code>Outer.Inner()</code></a>",
"<a href=\"Outer.Inner.html#Outer.Inner(int)\"><code>Outer.Inner(int)</code></a>",
"<a href=\"Outer.Inner.NestedInner.html#Outer.Inner.NestedInner()\"><code>Outer.Inner.NestedInner()</code></a>",
"<a href=\"Outer.Inner.NestedInner.html#Outer.Inner.NestedInner(int)\"><code>Outer.Inner.NestedInner(int)</code></a>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/Outer.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"Outer.Inner.html#Inner--\"><code>Inner()</code></a>, \n"
......
......@@ -24,7 +24,7 @@
/*
* @test
* @bug 4927552 8026567 8071982 8162674 8175200 8175218 8183511 8186332
* 8169819 8074407 8191030
* 8169819 8074407 8191030 8182765
* @summary test generated docs for deprecated items
* @author jamieh
* @library ../lib
......@@ -209,6 +209,97 @@ public class TestDeprecatedDocs extends JavadocTester {
+ "<li><a href=\"#enum.constant\">Enum Constants</a></li>\n"
+ "<li><a href=\"#annotation.type.member\">Annotation Type Elements</a></li>\n"
+ "</ul>",
"<a id=\"forRemoval\">",
"<table class=\"deprecatedSummary\">\n"
+ "<caption><span>For Removal</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Element</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>",
"<table class=\"deprecatedSummary\">\n"
+ "<caption><span>Enums</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Enum</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestEnum.html\" title=\"enum in pkg\">pkg.TestEnum</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">enum_test1 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>",
"<table class=\"deprecatedSummary\">\n"
+ "<caption><span>Exceptions</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Exceptions</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestException.html\" title=\"class in pkg\">pkg.TestException</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">exception_test1 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>",
"<table class=\"deprecatedSummary\">\n"
+ "<caption><span>Fields</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Field</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/DeprecatedClassByAnnotation.html#field\">pkg.DeprecatedClassByAnnotation.field</a></th>\n"
+ "<td class=\"colLast\"></td>\n"
+ "</tr>\n"
+ "<tr class=\"rowColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestAnnotationType.html#field\">pkg.TestAnnotationType.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">annotation_test4 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestClass.html#field\">pkg.TestClass.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">class_test2 passes. This is the second sentence of deprecated description for a field.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"rowColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestError.html#field\">pkg.TestError.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">error_test2 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestException.html#field\">pkg.TestException.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">exception_test2 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"rowColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestInterface.html#field\">pkg.TestInterface.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">interface_test2 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("deprecated-list.html", true,
"<a name=\"forRemoval\">",
"<table class=\"deprecatedSummary\" summary=\"For Removal table, listing for removal, and an explanation\">\n"
+ "<caption><span>For Removal</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
......
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4857717 8025633 8026567 8164407
* @bug 4857717 8025633 8026567 8164407 8182765
* @summary Test to make sure that externally overriden and implemented methods
* are documented properly. The method should still include "implements" or
* "overrides" documentation even though the method is external.
......@@ -33,9 +33,10 @@
* @build JavadocTester TestExternalOverridenMethod
* @run main TestExternalOverridenMethod
*/
public class TestExternalOverridenMethod extends JavadocTester {
static final String uri = "http://java.sun.com/j2se/1.4.1/docs/api";
public static void main(String... args) throws Exception {
TestExternalOverridenMethod tester = new TestExternalOverridenMethod();
tester.runTests();
......@@ -43,13 +44,35 @@ public class TestExternalOverridenMethod extends JavadocTester {
@Test
void test() {
String uri = "http://java.sun.com/j2se/1.4.1/docs/api";
javadoc("-d", "out",
"-sourcepath", testSrc,
"-linkoffline", uri, testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/XReader.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/FilterReader.html?is-external=true#read()\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">read</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"" + uri + "/java/io/FilterReader.html?is-external=true\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">FilterReader</a></code></dd>",
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/DataInput.html?is-external=true#readInt()\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">readInt</a></code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"" + uri + "/java/io/DataInput.html?is-external=true\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">DataInput</a></code></dd>"
);
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"-linkoffline", uri, testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/XReader.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/FilterReader.html?is-external=true#read--\" "
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8073100
* @bug 8073100 8182765
* @summary ensure the hidden tag works as intended
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
......@@ -38,7 +38,6 @@ public class TestHiddenTag extends JavadocTester {
tester.runTests();
}
/**
* Perform tests on &#64;hidden tags
*/
......@@ -51,20 +50,20 @@ public class TestHiddenTag extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/A.html", true,
"<a name=\"visibleField\">",
"<a name=\"visibleMethod--\">",
"<a id=\"visibleField\">",
"<a id=\"visibleMethod()\">",
"<dt>Direct Known Subclasses:</dt>\n" +
"<dd><code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" +
"A.VisibleInner</a></code>, <code><a href=\"A.VisibleInnerExtendsInvisibleInner.html\" " +
"title=\"class in pkg1\">A.VisibleInnerExtendsInvisibleInner</a></code></dd>");
checkOutput("pkg1/A.html", false,
"<a name=\"inVisibleField\">",
"<a name=\"inVisibleMethod--\">");
"<a id=\"inVisibleField\">",
"<a id=\"inVisibleMethod()\">");
checkOutput("pkg1/A.VisibleInner.html", true,
"<code><a href=\"A.html#visibleField\">visibleField</a></code>",
"<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>",
"<code><a href=\"A.html#visibleMethod()\">visibleMethod</a></code>",
"<h3>Nested classes/interfaces inherited from class&nbsp;pkg1." +
"<a href=\"A.html\" title=\"class in pkg1\">A</a></h3>\n" +
"<code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" +
......@@ -73,16 +72,16 @@ public class TestHiddenTag extends JavadocTester {
"</ul>");
checkOutput("pkg1/A.VisibleInner.html", false,
"../pkg1/A.VisibleInner.html#VisibleInner--",
"<a name=\"inVisibleField\">",
"<a name=\"inVisibleMethod--\">");
"../pkg1/A.VisibleInner.html#VisibleInner()",
"<a id=\"inVisibleField\">",
"<a id=\"inVisibleMethod()\">");
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", true,
"<pre>public static class <span class=\"typeNameLabel\">" +
"A.VisibleInnerExtendsInvisibleInner</span>\n" +
"extends <a href=\"A.html\" title=\"class in pkg1\">A</a></pre>",
"<code><a href=\"A.html#visibleField\">visibleField</a></code></li>",
"<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>");
"<code><a href=\"A.html#visibleMethod()\">visibleMethod</a></code>");
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", false,
"invisibleField",
......@@ -98,6 +97,33 @@ public class TestHiddenTag extends JavadocTester {
checkFiles(false,
"pkg1/A.InvisibleInner.html",
"pkg1/A.InvisibleInnerExtendsVisibleInner.html");
}
@Test
public void test1_html4() {
javadoc("-d", "out1-html4",
"-html4",
"-sourcepath", testSrc,
"-package",
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/A.html", true,
"<a name=\"visibleField\">",
"<a name=\"visibleMethod--\">");
checkOutput("pkg1/A.VisibleInner.html", true,
"<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>");
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", true,
"<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>");
checkOutput("pkg1/A.html", false,
"<a name=\"inVisibleMethod--\">");
checkOutput("pkg1/A.VisibleInner.html", false,
"../pkg1/A.VisibleInner.html#VisibleInner--",
"<a name=\"inVisibleField\">",
"<a name=\"inVisibleMethod--\">");
}
}
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4663254 8016328 8025633 8026567 8081854
* @bug 4663254 8016328 8025633 8026567 8081854 8182765
* @summary Verify that spaces do not appear in hrefs and anchors.
* @author jamieh
* @library ../lib
......@@ -50,24 +50,24 @@ public class TestHref extends JavadocTester {
checkOutput("pkg/C1.html", true,
//External link.
"href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait-long-int-\"",
"href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,int)\"",
//Member summary table link.
"href=\"#method-int-int-java.util.ArrayList-\"",
"href=\"#method(int,int,java.util.ArrayList)\"",
//Anchor test.
"<a name=\"method-int-int-java.util.ArrayList-\">\n"
"<a id=\"method(int,int,java.util.ArrayList)\">\n"
+ "<!-- -->\n"
+ "</a>",
//Backward compatibility anchor test."pkg/C1.html",
"<a name=\"method-int-int-java.util.ArrayList-\">\n"
"<a id=\"method(int,int,java.util.ArrayList)\">\n"
+ "<!-- -->\n"
+ "</a>");
checkOutput("pkg/C2.html", true,
//{@link} test.
"Link: <a href=\"C1.html#method-int-int-java.util.ArrayList-\">",
"Link: <a href=\"C1.html#method(int,int,java.util.ArrayList)\">",
//@see test.
"See Also:</span></dt>\n"
+ "<dd><a href=\"C1.html#method-int-int-java.util.ArrayList-\">"
+ "<dd><a href=\"C1.html#method(int,int,java.util.ArrayList)\">"
);
checkOutput("pkg/C4.html", true,
......@@ -80,4 +80,37 @@ public class TestHref extends JavadocTester {
checkOutput(Output.OUT, false,
"<a> tag is malformed");
}
@Test
void test_html4() {
javadoc("-Xdoclint:none",
"-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"-linkoffline", "http://java.sun.com/j2se/1.4/docs/api/", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/C1.html", true,
//External link.
"href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait-long-int-\"",
//Member summary table link.
"href=\"#method-int-int-java.util.ArrayList-\"",
//Anchor test.
"<a name=\"method-int-int-java.util.ArrayList-\">\n"
+ "<!-- -->\n"
+ "</a>",
//Backward compatibility anchor test."pkg/C1.html",
"<a name=\"method-int-int-java.util.ArrayList-\">\n"
+ "<!-- -->\n"
+ "</a>");
checkOutput("pkg/C2.html", true,
//{@link} test.
"Link: <a href=\"C1.html#method-int-int-java.util.ArrayList-\">",
//@see test.
"See Also:</span></dt>\n"
+ "<dd><a href=\"C1.html#method-int-int-java.util.ArrayList-\">"
);
}
}
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 6786690 6820360 8025633 8026567 8175200 8183511 8186332 8074407
* @bug 6786690 6820360 8025633 8026567 8175200 8183511 8186332 8074407 8182765
* @summary This test verifies the nesting of definition list tags.
* @author Bhavesh Patel
* @library ../lib
......@@ -57,6 +57,17 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
checkCommentDeprecated(true);
}
@Test
void test_Comment_Deprecated_html4() {
javadoc("-Xdoclint:none",
"-d", "out-1-html4",
"-html4",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkCommentDeprecated_html4(true);
}
@Test
void test_NoComment_Deprecated() {
// tester.run(ARGS2, TEST_ALL, NEGATED_TEST_NO_C5);
......@@ -72,6 +83,18 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
checkCommentDeprecated(false); // ??
}
@Test
void test_NoComment_Deprecated_html4() {
javadoc("-Xdoclint:none",
"-d", "out-2-html4",
"-html4",
"-nocomment",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkCommentDeprecated_html4(false);
}
@Test
void test_Comment_NoDeprecated() {
// tester.run(ARGS3, TEST_ALL, NEGATED_TEST_NO_C5);
......@@ -87,6 +110,19 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
checkNoCommentNoDeprecated(false);
}
@Test
void test_Comment_NoDeprecated_html4() {
javadoc("-Xdoclint:none",
"-d", "out-3-html4",
"-html4",
"-nodeprecated",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkNoDeprecated_html4();
checkNoCommentNoDeprecated_html4(false);
}
@Test
void testNoCommentNoDeprecated() {
// tester.run(ARGS4, TEST_ALL, NEGATED_TEST_NO_C5);
......@@ -103,6 +139,19 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
checkCommentDeprecated(false);
}
@Test
void testNoCommentNoDeprecated_html4() {
javadoc("-Xdoclint:none",
"-d", "out-4-html4",
"-html4",
"-nocomment",
"-nodeprecated",
"-sourcepath", testSrc,
"pkg1");
checkNoCommentNoDeprecated_html4(true);
checkCommentDeprecated_html4(false);
}
void checkCommon(boolean checkC5) {
// Test common to all runs of javadoc. The class signature should print
// properly enclosed definition list tags and the Annotation Type
......@@ -166,7 +215,7 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#setUndecorated-boolean-\">"
+ "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
......@@ -193,7 +242,7 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd>"
+ "<a href=\"#readObject--\"><code>readObject()"
+ "<a href=\"#readObject()\"><code>readObject()"
+ "</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
......@@ -201,7 +250,7 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:"
+ "</span></dt>\n"
+ "<dd><a href=\"#setUndecorated-boolean-\">"
+ "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>");
......@@ -223,12 +272,12 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">This field indicates whether the C1 is "
......@@ -239,12 +288,12 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">Reads the object stream.</div>\n"
......@@ -258,6 +307,82 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<div class=\"block\">The name for this class.</div>");
}
void checkCommentDeprecated_html4(boolean expectFound) {
// Test for normal run of javadoc in which various ClassDocs and
// serialized form should have properly nested definition list tags
// enclosing comments, tags and deprecated information.
checkOutput("pkg1/C1.html", expectFound,
"<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#setUndecorated-boolean-\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
+ "<dd><code>undecorated"
+ "</code> - <code>true</code> if no decorations are\n"
+ " to be enabled;\n"
+ " <code>false</code> "
+ "if decorations are to be enabled.</dd>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:"
+ "</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd>"
+ "<a href=\"#readObject--\"><code>readObject()"
+ "</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:"
+ "</span></dt>\n"
+ "<dd><a href=\"#setUndecorated-boolean-\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>");
checkOutput("serialized-form.html", expectFound,
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span>"
+ "</dt>\n"
+ "<dd><code>"
+ "java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">This field indicates whether the C1 is "
+ "undecorated.</div>\n"
+ "&nbsp;\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">Reads the object stream.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "</dl>");
}
void checkNoDeprecated() {
// Test with -nodeprecated option. The ClassDocs should have properly nested
// definition list tags enclosing comments and tags. The ClassDocs should not
......@@ -299,6 +424,81 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<dd><code>"
+ "HeadlessException</code></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Parameters:"
+ "</span></dt>\n"
+ "<dd><code>undecorated</code> - <code>true</code>"
+ " if no decorations are\n"
+ " to be enabled;\n"
+ " <code>false</code> if decorations are to be enabled."
+ "</dd>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#readObject()\">"
+ "<code>readObject()</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span>"
+ "</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt>"
+ "<span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>");
checkOutput("serialized-form.html", true,
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span>"
+ "</dt>\n"
+ "<dd><code>"
+ "java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">This field indicates whether the C1 is "
+ "undecorated.</div>\n"
+ "&nbsp;\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">Reads the object stream.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>"
+ "</div>\n"
+ "<div class=\"block\">"
+ "The name for this class.</div>");
}
void checkNoDeprecated_html4() {
// Test with -nodeprecated option. The ClassDocs should have properly nested
// definition list tags enclosing comments and tags. The ClassDocs should not
// display definition list for deprecated information. The serialized form
// should display properly nested definition list tags for comments, tags
// and deprecated information.
checkOutput("pkg1/C1.html", true,
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Parameters:"
+ "</span></dt>\n"
......@@ -360,11 +560,7 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<dt><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>"
+ "</div>\n"
+ "<div class=\"block\">"
+ "The name for this class.</div>");
+ "</dl>");
}
void checkNoCommentNoDeprecated(boolean expectFound) {
......@@ -386,6 +582,30 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
"APPLICATION_EXCLUDE</pre>\n" +
"</li>");
checkOutput("serialized-form.html", expectFound,
"<pre>boolean " +
"undecorated</pre>\n" +
"<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">" +
"Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>"
+ "setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+
"</li>",
"<span class=\"deprecatedLabel\">"
+ "Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">As of JDK version"
+ " 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "</li>");
}
void checkNoCommentNoDeprecated_html4(boolean expectFound) {
// Test with -nocomment and -nodeprecated options. The ClassDocs whould
// not display definition lists for any member details.
checkOutput("serialized-form.html", expectFound,
"<pre>boolean " +
"undecorated</pre>\n" +
......
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8008164 8169819 8183037
* @bug 8008164 8169819 8183037 8182765
* @summary Test styles on HTML tables generated by javadoc.
* @author Bhavesh Patel
* @library ../lib
......@@ -45,6 +45,43 @@ public class TestHtmlTableStyles extends JavadocTester {
"-sourcepath", testSrc,
"-use",
"pkg1", "pkg2");
checkExit(Exit.ERROR);
checkOutput(Output.OUT, true,
"attribute not supported in HTML5: summary",
"attribute border for table only accepts \"\" or \"1\", use CSS instead: BORDER",
"attribute not supported in HTML5: cellpadding",
"attribute not supported in HTML5: cellspacing",
"attribute not supported in HTML5: align");
checkOutput("pkg1/TestTable.html", true,
"<table summary=\"Summary\" border cellpadding=3 cellspacing=1>",
"<table class=\"memberSummary\">",
"<table class=\"memberSummary\">",
"<table class=\"memberSummary\">");
checkOutput("pkg1/package-summary.html", true,
"<table class=\"typeSummary\">");
checkOutput("pkg1/class-use/TestTable.html", true,
"<table class=\"useSummary\">");
checkOutput("overview-summary.html", true,
"<table class=\"overviewSummary\">");
checkOutput("deprecated-list.html", true,
"<table class=\"deprecatedSummary\">");
checkOutput("constant-values.html", true,
"<table class=\"constantsSummary\">");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"-use",
"pkg1", "pkg2");
checkExit(Exit.OK);
checkOutput("pkg1/TestTable.html", true,
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 6786688 8008164 8162363 8169819 8183037
* @bug 6786688 8008164 8162363 8169819 8183037 8182765
* @summary HTML tables should have table summary, caption and table headers.
* @author Bhavesh Patel
* @library ../lib
......@@ -53,11 +53,95 @@ public class TestHtmlTableTags extends JavadocTester {
"pkg1", "pkg2");
checkExit(Exit.OK);
checkHtmlTableSummaries();
checkHtmlTableTag();
checkHtmlTableCaptions();
checkHtmlTableHeaders();
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"-use",
"pkg1", "pkg2");
checkExit(Exit.OK);
checkHtmlTableSummaries();
}
/*
* Tests for validating table tag for HTML tables
*/
void checkHtmlTableTag() {
//Package summary
checkOutput("pkg1/package-summary.html", true,
"<table class=\"typeSummary\">",
"<table class=\"typeSummary\">");
checkOutput("pkg2/package-summary.html", true,
"<table class=\"typeSummary\">",
"<table class=\"typeSummary\">");
// Class documentation
checkOutput("pkg1/C1.html", true,
"<table class=\"memberSummary\">",
"<table class=\"memberSummary\">");
checkOutput("pkg2/C2.html", true,
"<table class=\"memberSummary\">",
"<table class=\"memberSummary\">");
checkOutput("pkg2/C2.ModalExclusionType.html", true,
"<table class=\"memberSummary\">");
checkOutput("pkg2/C3.html", true,
"<table class=\"memberSummary\">");
checkOutput("pkg2/C4.html", true,
"<table class=\"memberSummary\">");
// Class use documentation
checkOutput("pkg1/class-use/I1.html", true,
"<table class=\"useSummary\">");
checkOutput("pkg1/class-use/C1.html", true,
"<table class=\"useSummary\">",
"<table class=\"useSummary\">");
checkOutput("pkg2/class-use/C2.html", true,
"<table class=\"useSummary\">",
"<table class=\"useSummary\">");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
"<table class=\"useSummary\">");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
"<table class=\"useSummary\">");
// Package use documentation
checkOutput("pkg1/package-use.html", true,
"<table class=\"useSummary\">",
"<table class=\"useSummary\">");
checkOutput("pkg2/package-use.html", true,
"<table class=\"useSummary\">",
"<table class=\"useSummary\">");
// Deprecated
checkOutput("deprecated-list.html", true,
"<table class=\"deprecatedSummary\">",
"<table class=\"deprecatedSummary\">");
// Constant values
checkOutput("constant-values.html", true,
"<table class=\"constantsSummary\">");
// Overview Summary
checkOutput("overview-summary.html", true,
"<table class=\"overviewSummary\">");
}
/*
* Tests for validating summary for HTML tables
*/
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 6786682 4649116
* @bug 6786682 4649116 8182765
* @summary This test verifies the use of lang attribute by <HTML>.
* @author Bhavesh Patel
* @library ../lib
......@@ -106,11 +106,12 @@ public class TestHtmlTag extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg3/package-summary.html", true,
"<div class=\"contentContainer\"><a name=\"package.description\">\n"
"<div class=\"contentContainer\">\n"
+ "<section role=\"region\"><a id=\"package.description\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<div class=\"block\"><p>This is the first line."
+ " Note the newlines before the &lt;p&gt; is relevant.</div>");
+ "<div class=\"block\"><p>This is the first line. Note the newlines before the &lt;p&gt; is relevant.</div>\n"
+ "</section>");
checkOutput("pkg3/A.DatatypeFactory.html", true,
"<div class=\"block\"><p>\n"
......@@ -119,7 +120,7 @@ public class TestHtmlTag extends JavadocTester {
+ "\n"
+ " <p>\n"
+ " A new instance of the <code>DatatypeFactory</code> is created through the\n"
+ " <a href=\"#newInstance--\"><code>newInstance()</code></a> method that uses the following implementation\n"
+ " <a href=\"#newInstance()\"><code>newInstance()</code></a> method that uses the following implementation\n"
+ " resolution mechanisms to determine an implementation:</p>\n"
+ " <ol>\n"
+ " <li>\n"
......@@ -148,8 +149,7 @@ public class TestHtmlTag extends JavadocTester {
+ " </li>\n"
+ " <li>\n"
+ " The final mechanism is to attempt to instantiate the <code>Class</code>\n"
+ " specified by <a href=\"#DATATYPEFACTORY_IMPLEMENTATION_CLASS\">"
+ "<code>DATATYPEFACTORY_IMPLEMENTATION_CLASS</code></a>. Any Exception\n"
+ " specified by <a href=\"#DATATYPEFACTORY_IMPLEMENTATION_CLASS\"><code>DATATYPEFACTORY_IMPLEMENTATION_CLASS</code></a>. Any Exception\n"
+ " thrown during the instantiation process is wrapped as a\n"
+ " <code>IllegalStateException</code>.\n"
+ " </li>\n"
......@@ -176,21 +176,81 @@ public class TestHtmlTag extends JavadocTester {
+ " second argument to the remote object's constructor for object to use\n"
+ " during reinitialization/activation.</div>");
checkOutput("pkg3/A.ActivationGroupID.html", true,
"<pre>public class <span class=\"typeNameLabel\">A.ActivationGroupID</span>\n"
+ "extends java.lang.Object\n"
+ "implements java.io.Serializable</pre>\n"
+ "<div class=\"block\">The identifier for a registered activation group serves several purposes:\n"
+ " <ul>\n"
+ " <li>identifies the group uniquely within the activation system, and\n"
+ " <li>contains a reference to the group's activation system so that the\n"
+ " group can contact its activation system when necessary.</ul><p>\n"
+ "\n"
+ " The <code>ActivationGroupID</code> is returned from the call to\n"
+ " <code>ActivationSystem.registerGroup</code> and is used to identify the\n"
+ " group within the activation system. This group id is passed as one of the\n"
+ " arguments to the activation group's special constructor when an\n"
+ " activation group is created/recreated.</div>\n"
+ "<dl>");
checkOutput("pkg3/A.ActivationGroupID.html", true,
"<pre>public class <span class=\"typeNameLabel\">A.ActivationGroupID</span>\n"
+ "extends java.lang.Object\n"
+ "implements java.io.Serializable</pre>\n"
+ "<div class=\"block\">The identifier for a registered activation group serves several purposes:\n"
+ " <ul>\n"
+ " <li>identifies the group uniquely within the activation system, and\n"
+ " <li>contains a reference to the group's activation system so that the\n"
+ " group can contact its activation system when necessary.</ul><p>\n"
+ "\n"
+ " The <code>ActivationGroupID</code> is returned from the call to\n"
+ " <code>ActivationSystem.registerGroup</code> and is used to identify the\n"
+ " group within the activation system. This group id is passed as one of the\n"
+ " arguments to the activation group's special constructor when an\n"
+ " activation group is created/recreated.</div>\n"
+ "<dl>");
}
@Test
void test_other_html4() {
javadoc("-locale", "en_US",
"-d", "out-other-html4",
"-html4",
"-sourcepath", testSrc,
"pkg3");
checkExit(Exit.OK);
checkOutput("pkg3/package-summary.html", true,
"<div class=\"contentContainer\"><a name=\"package.description\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<div class=\"block\"><p>This is the first line."
+ " Note the newlines before the &lt;p&gt; is relevant.</div>");
checkOutput("pkg3/A.DatatypeFactory.html", true,
"<div class=\"block\"><p>\n"
+ " Factory that creates new <code>javax.xml.datatype</code>\n"
+ " <code>Object</code>s that map XML to/from Java <code>Object</code>s.</p>\n"
+ "\n"
+ " <p>\n"
+ " A new instance of the <code>DatatypeFactory</code> is created through the\n"
+ " <a href=\"#newInstance--\"><code>newInstance()</code></a> method that uses the following implementation\n"
+ " resolution mechanisms to determine an implementation:</p>\n"
+ " <ol>\n"
+ " <li>\n"
+ " If the system property specified by <a href=\"#DATATYPEFACTORY_PROPERTY\"><code>DATATYPEFACTORY_PROPERTY</code></a>,\n"
+ " \"<code>javax.xml.datatype.DatatypeFactory</code>\", exists, a class with\n"
+ " the name of the property value is instantiated. Any Exception thrown\n"
+ " during the instantiation process is wrapped as a\n"
+ " <code>IllegalStateException</code>.\n"
+ " </li>\n"
+ " <li>\n"
+ " If the file ${JAVA_HOME}/lib/jaxp.properties exists, it is loaded in a\n"
+ " <code>Properties</code> <code>Object</code>. The\n"
+ " <code>Properties</code> <code>Object </code> is then queried for the\n"
+ " property as documented in the prior step and processed as documented in\n"
+ " the prior step.\n"
+ " </li>\n"
+ " <li>\n"
+ " Uses the service-provider loading facilities, defined by the\n"
+ " <code>ServiceLoader</code> class, to attempt to locate and load an\n"
+ " implementation of the service using the default loading mechanism:\n"
+ " the service-provider loading facility will use the current thread's context class loader\n"
+ " to attempt to load the service. If the context class loader is null, the system class loader will be used.\n"
+ " <br>\n"
+ " In case of <code>service configuration error</code> a\n"
+ " <code>DatatypeConfigurationException</code> will be thrown.\n"
+ " </li>\n"
+ " <li>\n"
+ " The final mechanism is to attempt to instantiate the <code>Class</code>\n"
+ " specified by <a href=\"#DATATYPEFACTORY_IMPLEMENTATION_CLASS\">"
+ "<code>DATATYPEFACTORY_IMPLEMENTATION_CLASS</code></a>. Any Exception\n"
+ " thrown during the instantiation process is wrapped as a\n"
+ " <code>IllegalStateException</code>.\n"
+ " </li>\n"
+ " </ol></div>");
}
}
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8072945 8081854 8141492 8148985 8150188 4649116 8173707 8151743 8169819 8183037
* @bug 8072945 8081854 8141492 8148985 8150188 4649116 8173707 8151743 8169819 8183037 8182765
* @summary Test the version of HTML generated by the javadoc tool.
* @author bpatel
* @library ../lib
......@@ -41,7 +41,9 @@ public class TestHtmlVersion extends JavadocTester {
@Test
void test1() {
javadoc("-d", "out-1", "-private", "-linksource", "-html5",
javadoc("-d", "out-1",
"-private",
"-linksource",
"-sourcepath", testSrc,
"-use",
"pkg", "pkg1", "pkg2", "pkg3");
......@@ -53,7 +55,10 @@ public class TestHtmlVersion extends JavadocTester {
@Test
void test2() {
javadoc("-d", "out-2", "-private", "-linksource", "-html4",
javadoc("-d", "out-2",
"-html4",
"-private",
"-linksource",
"-sourcepath", testSrc,
"-use",
"pkg", "pkg1", "pkg2", "pkg3");
......@@ -65,7 +70,10 @@ public class TestHtmlVersion extends JavadocTester {
@Test
void test3() {
javadoc("-d", "out-3", "-private", "-linksource",
javadoc("-d", "out-3",
"-html4",
"-private",
"-linksource",
"-sourcepath", testSrc,
"-use",
"pkg", "pkg1", "pkg2", "pkg3");
......@@ -77,7 +85,9 @@ public class TestHtmlVersion extends JavadocTester {
@Test
void test4() {
javadoc("-d", "out-4", "-private", "-linksource", "-html5",
javadoc("-d", "out-4",
"-private",
"-linksource",
"-sourcepath", testSrc,
"-use",
"pkg3");
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8194955
* @bug 8194955 8182765
* @summary Warn when default HTML version is used.
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
......@@ -47,8 +47,11 @@ public class TestHtmlWarning extends JavadocTester {
}
private static final Path testFile = Paths.get("C.java");
private static final String warning =
"javadoc: warning - You have not specified the version of HTML to use.";
private static final String warning
= "javadoc: warning - You have specified the HTML version as HTML 4.01 by using the -html4 option.\n"
+ "The default is currently HTML5 and the support for HTML 4.01 will be removed\n"
+ "in a future release. To suppress this warning, please ensure that any HTML constructs\n"
+ "in your comments are valid in HTML5, and remove the -html4 option.";
@Test
void testHtml4() {
......@@ -57,7 +60,7 @@ public class TestHtmlWarning extends JavadocTester {
testFile.toString());
checkExit(Exit.OK);
checkOutput(Output.OUT, false, warning);
checkOutput(Output.OUT, true, warning);
}
@Test
......@@ -76,6 +79,6 @@ public class TestHtmlWarning extends JavadocTester {
testFile.toString());
checkExit(Exit.OK);
checkOutput(Output.OUT, true, warning);
checkOutput(Output.OUT, false, warning);
}
}
......@@ -24,7 +24,7 @@
/*
* @test
* @bug 4682448 4947464 5029946 8025633 8026567 8035473 8139101 8175200
8186332 8186703
8186332 8186703 8182765
* @summary Verify that the public modifier does not show up in the
* documentation for public methods, as recommended by the JLS.
* If A implements I and B extends A, B should be in the list of
......@@ -99,14 +99,14 @@ public class TestInterface extends JavadocTester {
+ "</ul>",
//Make sure "Specified By" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"Interface.html#method--\">method</a>"
+ "<dd><code><a href=\"Interface.html#method()\">method</a>"
+ "</code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"Interface.html\" title=\"interface in pkg\">"
+ "Interface</a>&lt;<a href=\"Child.html\" title=\"type parameter in Child\">"
+ "CE</a>&gt;</code></dd>",
//Make sure "Overrides" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"Parent.html#method--\">method</a>"
+ "<dd><code><a href=\"Parent.html#method()\">method</a>"
+ "</code>&nbsp;in class&nbsp;<code><a href=\"Parent.html\" "
+ "title=\"class in pkg\">Parent</a>&lt;<a href=\"Child.html\" "
+ "title=\"type parameter in Child\">CE</a>&gt;</code></dd>");
......@@ -120,7 +120,7 @@ public class TestInterface extends JavadocTester {
+ "</dl>");
checkOutput("pkg/Interface.html", false,
"public int&nbsp;method()",
"public int&nbsp;method--",
"public static final&nbsp;int field");
checkOutput("pkg/ClassWithStaticMembers.html", false,
......@@ -135,7 +135,7 @@ public class TestInterface extends JavadocTester {
"<td class=\"colFirst\"><code>static void</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#m--\">m</a></span>()</code></th>\n"
+ "<a href=\"#m()\">m</a></span>()</code></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"block\">A hider method</div>\n"
+ "</td>\n",
......@@ -144,7 +144,7 @@ public class TestInterface extends JavadocTester {
+ "<pre>public static&nbsp;void&nbsp;staticMethod()</pre>\n"
+ "<div class=\"block\"><span class=\"descfrmTypeLabel\">"
+ "Description copied from interface:&nbsp;<code>"
+ "<a href=\"InterfaceWithStaticMembers.html#staticMethod--\">"
+ "<a href=\"InterfaceWithStaticMembers.html#staticMethod()\">"
+ "InterfaceWithStaticMembers</a></code></span></div>\n"
+ "<div class=\"block\">A static method</div>\n");
......@@ -155,6 +155,49 @@ public class TestInterface extends JavadocTester {
+ "<div class=\"block\">A hider inner class</div>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/Child.html", true,
//Make sure "Specified By" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"Interface.html#method--\">method</a>"
+ "</code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"Interface.html\" title=\"interface in pkg\">"
+ "Interface</a>&lt;<a href=\"Child.html\" title=\"type parameter in Child\">"
+ "CE</a>&gt;</code></dd>",
//Make sure "Overrides" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"Parent.html#method--\">method</a>"
+ "</code>&nbsp;in class&nbsp;<code><a href=\"Parent.html\" "
+ "title=\"class in pkg\">Parent</a>&lt;<a href=\"Child.html\" "
+ "title=\"type parameter in Child\">CE</a>&gt;</code></dd>");
checkOutput("pkg/ClassWithStaticMembers.html", true,
"<td class=\"colFirst\"><code>static void</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#m--\">m</a></span>()</code></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"block\">A hider method</div>\n"
+ "</td>\n",
"<h4>staticMethod</h4>\n"
+ "<pre>public static&nbsp;void&nbsp;staticMethod()</pre>\n"
+ "<div class=\"block\"><span class=\"descfrmTypeLabel\">"
+ "Description copied from interface:&nbsp;<code>"
+ "<a href=\"InterfaceWithStaticMembers.html#staticMethod--\">"
+ "InterfaceWithStaticMembers</a></code></span></div>\n"
+ "<div class=\"block\">A static method</div>\n");
checkOutput("pkg/Interface.html", false,
"public int&nbsp;method()");
}
@Test
void test1() {
javadoc("-d", "out-1",
......@@ -162,6 +205,23 @@ public class TestInterface extends JavadocTester {
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/Child.html", true,
// Ensure the correct Overrides in the inheritance hierarchy is reported
"<span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<dd><code><a href=\"GrandParent.html#method1()\">method1</a></code>" +
"&nbsp;in class&nbsp;" +
"<code><a href=\"GrandParent.html\" title=\"class in pkg1\">GrandParent</a>" +
"&lt;<a href=\"Child.html\" title=\"type parameter in Child\">CE</a>&gt;</code>");
}
@Test
void test1_html4() {
javadoc("-d", "out-1-html4",
"-html4",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/Child.html", true,
// Ensure the correct Overrides in the inheritance hierarchy is reported
"<span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
......
......@@ -24,7 +24,7 @@
/*
* @test
* @bug 7112427 8012295 8025633 8026567 8061305 8081854 8150130 8162363
* 8167967 8172528 8175200 8178830 8182257 8186332
* 8167967 8172528 8175200 8178830 8182257 8186332 8182765
* @summary Test of the JavaFX doclet features.
* @author jvalenta
* @library ../lib
......@@ -51,9 +51,8 @@ public class TestJavaFX extends JavadocTester {
checkOutput("pkg1/C.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#getRate--\"><code>getRate()</code></a>, \n"
+ "<a href=\"#setRate-double-\">"
+ "<code>setRate(double)</code></a></dd>",
+ "<dd><a href=\"#getRate()\"><code>getRate()</code></a>, \n"
+ "<a href=\"#setRate(double)\"><code>setRate(double)</code></a></dd>",
"<pre>public final&nbsp;void&nbsp;setRate&#8203;(double&nbsp;value)</pre>\n"
+ "<div class=\"block\">Sets the value of the property rate.</div>\n"
+ "<dl>\n"
......@@ -77,7 +76,7 @@ public class TestJavaFX extends JavadocTester {
"<p>Gets the value of the property <code>Property</code>",
"<span class=\"simpleTagLabel\">Property description:</span>",
"<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#setTestMethodProperty--\">"
+ "<a href=\"#setTestMethodProperty()\">"
+ "setTestMethodProperty</a></span>()</code></th>",
"<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#pausedProperty\">paused</a></span></code></th>\n"
......@@ -135,7 +134,7 @@ public class TestJavaFX extends JavadocTester {
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>JavaFX 8.0</dd>",
"<h3>Property Summary</h3>\n"
+ "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ "<table class=\"memberSummary\">\n"
+ "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>",
"<tr class=\"altColor\">\n"
+ "<td class=\"colFirst\"><code><a href=\"C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
......@@ -168,6 +167,30 @@ public class TestJavaFX extends JavadocTester {
checkOutput("pkg1/D.html", false, "shouldNotAppear");
}
@Test
void test1_html4() {
javadoc("-d", "out1-html4",
"-html4",
"-sourcepath", testSrc,
"-javafx",
"-package",
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/C.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#getRate--\"><code>getRate()</code></a>, \n"
+ "<a href=\"#setRate-double-\">"
+ "<code>setRate(double)</code></a></dd>",
"<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#setTestMethodProperty--\">"
+ "setTestMethodProperty</a></span>()</code></th>",
"<h3>Property Summary</h3>\n"
+ "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
}
/*
* Test with -javafx option enabled, to ensure property getters and setters
* are treated correctly.
......@@ -182,7 +205,7 @@ public class TestJavaFX extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", true,
"<h3>Property Detail</h3>\n"
+ "<a name=\"betaProperty\">\n"
+ "<a id=\"betaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockList\">\n"
......@@ -191,7 +214,7 @@ public class TestJavaFX extends JavadocTester {
+ "<pre>public&nbsp;java.lang.Object betaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
+ "<a name=\"gammaProperty\">\n"
+ "<a id=\"gammaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockList\">\n"
......@@ -200,7 +223,7 @@ public class TestJavaFX extends JavadocTester {
+ "<pre>public final&nbsp;java.util.List&lt;java.lang.String&gt; gammaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
+ "<a name=\"deltaProperty\">\n"
+ "<a id=\"deltaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockListLast\">\n"
......@@ -213,7 +236,7 @@ public class TestJavaFX extends JavadocTester {
+ "</li>\n"
+ "</ul>",
"<h3>Property Summary</h3>\n"
+ "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ "<table class=\"memberSummary\">\n"
+ "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
checkOutput("pkg2/Test.html", false,
......@@ -226,6 +249,52 @@ public class TestJavaFX extends JavadocTester {
+ "</caption>");
}
@Test
void test2_html4() {
javadoc("-d", "out2a-html4",
"-html4",
"-sourcepath", testSrc,
"-javafx",
"-package",
"pkg2");
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", true,
"<h3>Property Detail</h3>\n"
+ "<a name=\"betaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockList\">\n"
+ "<li class=\"blockList\">\n"
+ "<h4>beta</h4>\n"
+ "<pre>public&nbsp;java.lang.Object betaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
+ "<a name=\"gammaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockList\">\n"
+ "<li class=\"blockList\">\n"
+ "<h4>gamma</h4>\n"
+ "<pre>public final&nbsp;java.util.List&lt;java.lang.String&gt; gammaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
+ "<a name=\"deltaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockListLast\">\n"
+ "<li class=\"blockList\">\n"
+ "<h4>delta</h4>\n"
+ "<pre>public final&nbsp;java.util.List&lt;"
+ "java.util.Set&lt;? super java.lang.Object&gt;&gt; deltaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
+ "</li>\n"
+ "</ul>",
"<h3>Property Summary</h3>\n"
+ "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
}
/*
* Test without -javafx option, to ensure property getters and setters
* are treated just like any other java method.
......@@ -238,6 +307,47 @@ public class TestJavaFX extends JavadocTester {
"pkg2");
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", false, "<h3>Property Summary</h3>");
checkOutput("pkg2/Test.html", true,
"<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tr id=\"i0\" class=\"altColor\">\n"
+ "<td class=\"colFirst\"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#alphaProperty(java.util.List)\">alphaProperty</a>"
+ "</span>&#8203;(java.util.List&lt;T&gt;&nbsp;foo)</code></th>\n"
+ "<td class=\"colLast\">&nbsp;</td>\n"
+ "</tr>\n"
+ "<tr id=\"i1\" class=\"rowColor\">\n"
+ "<td class=\"colFirst\"><code>java.lang.Object</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#betaProperty()\">betaProperty</a></span>()</code></th>\n"
+ "<td class=\"colLast\">&nbsp;</td>\n"
+ "</tr>\n"
+ "<tr id=\"i2\" class=\"altColor\">\n"
+ "<td class=\"colFirst\"><code>java.util.List&lt;java.util.Set&lt;? super java.lang.Object&gt;&gt;"
+ "</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#deltaProperty()\">deltaProperty</a></span>()</code></th>\n"
+ "<td class=\"colLast\">&nbsp;</td>\n"
+ "</tr>\n"
+ "<tr id=\"i3\" class=\"rowColor\">\n"
+ "<td class=\"colFirst\"><code>java.util.List&lt;java.lang.String&gt;</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#gammaProperty()\">gammaProperty</a></span>()</code></th>\n"
+ "<td class=\"colLast\">&nbsp;</td>"
);
}
@Test
void test3_html4() {
javadoc("-d", "out2b-html4",
"-html4",
"-sourcepath", testSrc,
"-package",
"pkg2");
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", true,
"<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4720957 5020118 8026567 8038976 8184969 8164407
* @bug 4720957 5020118 8026567 8038976 8184969 8164407 8182765
* @summary Test to make sure that -link and -linkoffline link to
* right files, and URLs with and without trailing slash are accepted.
* @author jamieh
......@@ -66,7 +66,9 @@ public class TestLinkOption extends JavadocTester {
"-linkoffline", url, testSrc + "/jdk",
"-package",
"pkg", "mylib.lang");
checkExit(Exit.OK);
checkExit(Exit.ERROR);
checkOutput(Output.OUT, true,
"tag not supported in the generated HTML version: tt");
checkOutput("pkg/C.html", true,
"<a href=\"" + url + "java/lang/String.html?is-external=true\" "
......@@ -82,11 +84,11 @@ public class TestLinkOption extends JavadocTester {
checkOutput("pkg/B.html", true,
"<div class=\"block\">A method with html tag the method "
+ "<a href=\"" + url + "java/lang/ClassLoader.html?is-external=true#getSystemClassLoader--\""
+ "<a href=\"" + url + "java/lang/ClassLoader.html?is-external=true#getSystemClassLoader()\""
+ " title=\"class or interface in java.lang\" class=\"externalLink\"><code><tt>getSystemClassLoader()</tt>"
+ "</code></a> as the parent class loader.</div>",
"<div class=\"block\">is equivalent to invoking <code>"
+ "<a href=\"#createTempFile-java.lang.String-java.lang.String-java.io.File-\">"
+ "<a href=\"#createTempFile(java.lang.String,java.lang.String,java.io.File)\">"
+ "<code>createTempFile(prefix,&nbsp;suffix,&nbsp;null)</code></a></code>.</div>",
"<a href=\"" + url + "java/lang/String.html?is-external=true\" "
+ "title=\"class or interface in java.lang\" class=\"externalLink\">Link-Plain to String Class</a>",
......@@ -109,6 +111,25 @@ public class TestLinkOption extends JavadocTester {
+ "title=\"class or interface in java.lang\" class=\"externalLink\">Object</a></pre>"
);
String out1_html4 = "out1-html4";
javadoc("-d", out1_html4,
"-html4",
"-classpath", mylib,
"-sourcepath", testSrc,
"-linkoffline", url, testSrc + "/jdk",
"-package",
"pkg", "mylib.lang");
checkExit(Exit.OK);
checkOutput("pkg/B.html", true,
"<div class=\"block\">A method with html tag the method "
+ "<a href=\"" + url + "java/lang/ClassLoader.html?is-external=true#getSystemClassLoader--\""
+ " title=\"class or interface in java.lang\" class=\"externalLink\"><code><tt>getSystemClassLoader()</tt>"
+ "</code></a> as the parent class loader.</div>",
"<div class=\"block\">is equivalent to invoking <code>"
+ "<a href=\"#createTempFile-java.lang.String-java.lang.String-java.io.File-\">"
+ "<code>createTempFile(prefix,&nbsp;suffix,&nbsp;null)</code></a></code>.</div>");
// Generate the documentation using -linkoffline and a relative path as the first parameter.
// We will try linking to the docs generated in test 1 with a relative path.
String out2 = "out2";
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4732864 6280605 7064544 8014636 8016328 8025633 8071982
* @bug 4732864 6280605 7064544 8014636 8016328 8025633 8071982 8182765
* @summary Make sure that you can link from one member to another using
* non-qualified name, furthermore, ensure the right one is linked.
* @author jamieh
......@@ -52,9 +52,9 @@ public class TestLinkTaglet extends JavadocTester {
"Qualified Link: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Unqualified Link1: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Unqualified Link2: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Qualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
+ " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
+ " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>\n"
+ " Qualified Link: <a href=\"#method(pkg.C.InnerC,pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
+ " Unqualified Link: <a href=\"#method(pkg.C.InnerC,pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
+ " Unqualified Link: <a href=\"#method(pkg.C.InnerC,pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>\n"
+ " Package Link: <a href=\"package-summary.html\"><code>pkg</code></a>.<br/>");
checkOutput("pkg/C.InnerC.html", true,
......@@ -73,4 +73,23 @@ public class TestLinkTaglet extends JavadocTester {
checkFiles(false, "checkPkg/A.html");
}
@Test
void test_html4() {
javadoc("-Xdoclint:none",
"-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg", testSrc("checkPkg/B.java"));
checkExit(Exit.OK);
checkOutput("pkg/C.html", true,
"Qualified Link: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Unqualified Link1: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Unqualified Link2: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Qualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
+ " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
+ " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>\n"
+ " Package Link: <a href=\"package-summary.html\"><code>pkg</code></a>.<br/>");
}
}
/*
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4521661 8081854
* @bug 4521661 8081854 8182765
* @summary Test to make sure that there is a link with a proper anchor
* from a serializable class to serialized-form.html.
* @author jamieh
......@@ -48,8 +48,20 @@ public class TestLinkToSerialForm extends JavadocTester {
checkExit(Exit.OK);
checkOutput("serialized-form.html", true,
"<a name=\"pkg.C\">");
"<a id=\"pkg.C\">");
checkOutput("pkg/C.html", true,
"<a href=\"../serialized-form.html#pkg.C\">");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("serialized-form.html", true,
"<a name=\"pkg.C\">");
}
}
......@@ -24,7 +24,7 @@
/*
* @test
* @bug 4638588 4635809 6256068 6270645 8025633 8026567 8162363 8175200
* 8192850
* 8192850 8182765
* @summary Test to make sure that members are inherited properly in the Javadoc.
* Verify that inheritance labels are correct.
* @author jamieh
......@@ -52,13 +52,13 @@ public class TestMemberInheritance extends JavadocTester {
// Public field should be inherited
"<a href=\"BaseClass.html#pubField\">",
// Public method should be inherited
"<a href=\"BaseClass.html#pubMethod--\">",
"<a href=\"BaseClass.html#pubMethod()\">",
// Public inner class should be inherited.
"<a href=\"BaseClass.pubInnerClass.html\" title=\"class in pkg\">",
// Protected field should be inherited
"<a href=\"BaseClass.html#proField\">",
// Protected method should be inherited
"<a href=\"BaseClass.html#proMethod--\">",
"<a href=\"BaseClass.html#proMethod()\">",
// Protected inner class should be inherited.
"<a href=\"BaseClass.proInnerClass.html\" title=\"class in pkg\">",
// New labels as of 1.5.0
......@@ -71,7 +71,7 @@ public class TestMemberInheritance extends JavadocTester {
// Test overriding/implementing methods with generic parameters.
"<dl>\n"
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"BaseInterface.html#getAnnotation-java.lang.Class-\">"
+ "<dd><code><a href=\"BaseInterface.html#getAnnotation(java.lang.Class)\">"
+ "getAnnotation</a></code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"BaseInterface.html\" title=\"interface in pkg\">"
+ "BaseInterface</a></code></dd>\n"
......@@ -79,12 +79,59 @@ public class TestMemberInheritance extends JavadocTester {
checkOutput("diamond/Z.html", true,
// Test diamond inheritance member summary (6256068)
"<code><a href=\"A.html#aMethod--\">aMethod</a></code>");
"<code><a href=\"A.html#aMethod()\">aMethod</a></code>");
checkOutput("inheritDist/C.html", true,
// Test that doc is inherited from closed parent (6270645)
"<div class=\"block\">m1-B</div>");
checkOutput("pkg/SubClass.html", false,
"<a href=\"BaseClass.html#staticMethod()\">staticMethod</a></code>");
checkOutput("pkg1/Implementer.html", true,
// ensure the method makes it
"<td class=\"colFirst\"><code>static java.time.Period</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#between(java.time.LocalDate,java.time.LocalDate)\">"
+ "between</a></span>&#8203;(java.time.LocalDate&nbsp;startDateInclusive,\n"
+ " java.time.LocalDate&nbsp;endDateExclusive)</code></th>");
checkOutput("pkg1/Implementer.html", false,
"<h3>Methods inherited from interface&nbsp;pkg1.<a href=\"Interface.html\""
+ " title=\"interface in pkg1\">Interface</a></h3>\n"
+ "<code><a href=\"Interface.html#between(java.time.chrono.ChronoLocalDate"
+ ",java.time.chrono.ChronoLocalDate)\">between</a></code>"
);
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg", "diamond", "inheritDist", "pkg1");
checkExit(Exit.OK);
checkOutput("pkg/SubClass.html", true,
// Public method should be inherited
"<a href=\"BaseClass.html#pubMethod--\">",
// Protected method should be inherited
"<a href=\"BaseClass.html#proMethod--\">");
checkOutput("pkg/BaseClass.html", true,
// Test overriding/implementing methods with generic parameters.
"<dl>\n"
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"BaseInterface.html#getAnnotation-java.lang.Class-\">"
+ "getAnnotation</a></code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"BaseInterface.html\" title=\"interface in pkg\">"
+ "BaseInterface</a></code></dd>\n"
+ "</dl>");
checkOutput("diamond/Z.html", true,
// Test diamond inheritance member summary (6256068)
"<code><a href=\"A.html#aMethod--\">aMethod</a></code>");
checkOutput("pkg/SubClass.html", false,
"<a href=\"BaseClass.html#staticMethod--\">staticMethod</a></code>");
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4951228 6290760 8025633 8026567 8081854 8162363 8175200 8177417 8186332
* @bug 4951228 6290760 8025633 8026567 8081854 8162363 8175200 8177417 8186332 8182765
* @summary Test the case where the overriden method returns a different
* type than the method in the child class. Make sure the
* documentation is inherited but the return type isn't.
......@@ -43,7 +43,8 @@ public class TestMemberSummary extends JavadocTester {
@Test
void test() {
javadoc("-d", "out", "-private",
javadoc("-d", "out",
"-private",
"-sourcepath", testSrc,
"pkg","pkg2");
checkExit(Exit.OK);
......@@ -51,12 +52,44 @@ public class TestMemberSummary extends JavadocTester {
checkOutput("pkg/PublicChild.html", true,
// Check return type in member summary.
"<code><a href=\"PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#returnTypeTest--\">"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#returnTypeTest()\">"
+ "returnTypeTest</a></span>()</code>",
// Check return type in member detail.
"<pre>public&nbsp;<a href=\"PublicChild.html\" title=\"class in pkg\">"
+ "PublicChild</a>&nbsp;returnTypeTest()</pre>",
"<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#%3Cinit%3E()\">PublicChild</a></span>()</code></th>");
checkOutput("pkg/PrivateParent.html", true,
"<td class=\"colFirst\"><code>private </code></td>\n"
+ "<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#%3Cinit%3E(int)\">PrivateParent</a></span>&#8203;(int&nbsp;i)</code>"
+ "</th>");
// Legacy anchor dimensions (6290760)
checkOutput("pkg2/A.html", true,
"<a id=\"f(java.lang.Object[])\">\n"
+ "<!-- -->\n"
+ "</a><a id=\"f(T[])\">\n"
+ "<!-- -->\n"
+ "</a>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-private",
"-sourcepath", testSrc,
"pkg","pkg2");
checkExit(Exit.OK);
checkOutput("pkg/PublicChild.html", true,
// Check return type in member summary.
"<code><a href=\"PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#returnTypeTest--\">"
+ "returnTypeTest</a></span>()</code>",
"<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#PublicChild--\">PublicChild</a></span>()</code></th>");
checkOutput("pkg/PrivateParent.html", true,
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8178339
* @bug 8178339 8182765
* @summary Tests indirect exports and opens in the module summary page
* @modules jdk.javadoc/jdk.javadoc.internal.api
* jdk.javadoc/jdk.javadoc.internal.tool
......@@ -72,6 +72,16 @@ public class TestIndirectExportsOpens extends JavadocTester {
checkExit(Exit.OK);
verifyIndirectExports(false);
verifyIndirectOpens(false);
javadoc("-d", base.resolve("out-api-html4").toString(),
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--expand-requires", "transitive",
"--module", "a");
checkExit(Exit.OK);
verifyIndirectExports_html4(false);
verifyIndirectOpens_html4(false);
}
@Test
......@@ -98,6 +108,16 @@ public class TestIndirectExportsOpens extends JavadocTester {
checkExit(Exit.OK);
verifyIndirectExports(true);
verifyIndirectOpens(true);
javadoc("-d", base.resolve("out-api-html4").toString(),
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--expand-requires", "transitive",
"--module", "a");
checkExit(Exit.OK);
verifyIndirectExports_html4(true);
verifyIndirectOpens_html4(true);
}
@Test
......@@ -125,6 +145,17 @@ public class TestIndirectExportsOpens extends JavadocTester {
checkExit(Exit.OK);
verifyIndirectExports(false);
verifyIndirectOpens(false);
javadoc("-d", base.resolve("out-api-html4").toString(),
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--expand-requires", "transitive",
"--module", "a");
checkExit(Exit.OK);
verifyIndirectExports_html4(false);
verifyIndirectOpens_html4(false);
}
@Test
......@@ -157,13 +188,13 @@ public class TestIndirectExportsOpens extends JavadocTester {
// could be listed in the indirects section, so just
// check for minimal expected strings.
checkOutput("a/module-summary.html", true,
"Indirect Exports table",
"Indirect Exports",
"<th class=\"colFirst\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ "<td class=\"colLast\"><a href=\"../m/exportsto/package-summary.html\">exportsto</a></td>\n"
+ "</tr>\n");
checkOutput("a/module-summary.html", true,
"Indirect Opens table",
"Indirect Opens",
"<th class=\"colFirst\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ "<td class=\"colLast\">opensto</td>\n"
+ "</tr>\n");
......@@ -188,7 +219,7 @@ public class TestIndirectExportsOpens extends JavadocTester {
}
checkOutput("a/module-summary.html", present,
"<table class=\"packagesSummary\" summary=\"" + typeString + " table, listing modules, and packages\">\n"
"<table class=\"packagesSummary\">\n"
+ "<caption><span>" + typeString + "</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">From</th>\n"
......@@ -203,5 +234,37 @@ public class TestIndirectExportsOpens extends JavadocTester {
+ "</table>\n");
}
}
void verifyIndirectExports_html4(boolean present) {
verifyIndirects_html4(present, false);
}
void verifyIndirectOpens_html4(boolean present) {
verifyIndirects_html4(present, true);
}
void verifyIndirects_html4(boolean present, boolean opens) {
String typeString = opens ? "Indirect Opens" : "Indirect Exports";
// Avoid false positives, just check for primary string absence.
if (!present) {
checkOutput("a/module-summary.html", false, typeString);
return;
}
checkOutput("a/module-summary.html", present,
"<table class=\"packagesSummary\" summary=\"" + typeString + " table, listing modules, and packages\">\n"
+ "<caption><span>" + typeString + "</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">From</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Packages</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ "<td class=\"colLast\"><a href=\"../m/pm/package-summary.html\">pm</a></td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>\n");
}
}
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8178067 8192007
* @bug 8178067 8192007 8182765
* @summary tests the module's services, such as provides and uses
* @modules jdk.javadoc/jdk.javadoc.internal.api
* jdk.javadoc/jdk.javadoc.internal.tool
......@@ -117,7 +117,8 @@ public class TestModuleServices extends JavadocTester {
mb.write(src);
javadoc("-d", base.resolve("out").toString(),
"-quiet", "-noindex",
"-quiet",
"-noindex",
"--module-source-path", src.toString(),
"--module", "moduleService,moduleServiceProvider,moduleServiceUser,moduleServiceUserNoDescription",
"pkgService", "moduleServiceProvider/pkgServiceProvider", "moduleServiceUser/pkgServiceUser",
......@@ -193,6 +194,33 @@ public class TestModuleServices extends JavadocTester {
checkOutput("m/module-summary.html", true,
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
"<table class=\"usesSummary\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" +
"<td class=\"colLast\">&nbsp;</td>\n" +
"</tr>\n" +
"<tr class=\"rowColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/B.html\" title=\"class in p1\">B</a></th>\n" +
"<td class=\"colLast\">&nbsp;</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--show-module-contents", "all",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<table class=\"usesSummary\" summary=\"Uses table, listing types, and an explanation\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
......@@ -233,6 +261,28 @@ public class TestModuleServices extends JavadocTester {
checkOutput("m/module-summary.html", true,
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
"<table class=\"usesSummary\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" +
"<td class=\"colLast\">&nbsp;</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<table class=\"usesSummary\" summary=\"Uses table, listing types, and an explanation\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
......@@ -299,6 +349,33 @@ public class TestModuleServices extends JavadocTester {
checkOutput("m/module-summary.html", true,
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
"<table class=\"providesSummary\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
"<td class=\"colLast\">&nbsp;<br>(<span class=\"implementationLabel\">Implementation(s):</span>&nbsp;<a href=\"p1/B.html\" title=\"class in p1\">B</a>)</td>\n" +
"</tr>\n" +
"<tr class=\"rowColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p2/A.html\" title=\"interface in p2\">A</a></th>\n" +
"<td class=\"colLast\">&nbsp;<br>(<span class=\"implementationLabel\">Implementation(s):</span>&nbsp;<a href=\"p2/B.html\" title=\"class in p2\">B</a>)</td>\n" +
"</tr>\n" +
"</tbody>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--show-module-contents", "all",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<table class=\"providesSummary\" summary=\"Provides table, listing types, and an explanation\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
......@@ -342,6 +419,30 @@ public class TestModuleServices extends JavadocTester {
checkOutput("m/module-summary.html", true,
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
"<table class=\"providesSummary\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
"<td class=\"colLast\">\n" +
"<div class=\"block\">abc</div>\n</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<table class=\"providesSummary\" summary=\"Provides table, listing types, and an explanation\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
......@@ -384,6 +485,44 @@ public class TestModuleServices extends JavadocTester {
checkOutput("m/module-summary.html", true,
"<h3>Services</h3>");
checkOutput("m/module-summary.html", true,
"<table class=\"providesSummary\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
"<td class=\"colLast\">\n" +
"<div class=\"block\">abc</div>\n</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>",
"<table class=\"usesSummary\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p2/B.html\" title=\"class in p2\">B</a></th>\n" +
"<td class=\"colLast\">\n" +
"<div class=\"block\">def</div>\n</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<table class=\"providesSummary\" summary=\"Provides table, listing types, and an explanation\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 8151743 8196027
* @bug 4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 8151743 8196027 8182765
* @summary Make sure the Next/Prev Class links iterate through all types.
* Make sure the navagation is 2 columns, not 3.
* @author jamieh
......@@ -42,7 +42,8 @@ public class TestNavigation extends JavadocTester {
@Test
void test() {
javadoc("-d", "out", "-overview", testSrc("overview.html"),
javadoc("-d", "out",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
......@@ -62,11 +63,54 @@ public class TestNavigation extends JavadocTester {
checkOutput("pkg/I.html", true,
// Test for 4664607
"<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
+ "<a name=\"navbar.top.firstrow\">\n"
+ "<a id=\"navbar.top.firstrow\">\n"
+ "<!-- -->\n"
+ "</a>",
"<li><a href=\"../overview-summary.html\">Overview</a></li>");
// Remaining tests check for additional padding to offset the fixed navigation bar.
checkOutput("pkg/A.html", true,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "</div>\n"
+ "<div class=\"navPadding\">&nbsp;</div>\n"
+ "<script type=\"text/javascript\"><!--\n"
+ "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ "//-->\n"
+ "</script>\n"
+ "</nav>\n"
+ "</header>\n"
+ "<!-- ======== START OF CLASS DATA ======== -->");
checkOutput("pkg/package-summary.html", true,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "</div>\n"
+ "<div class=\"navPadding\">&nbsp;</div>\n"
+ "<script type=\"text/javascript\"><!--\n"
+ "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ "//-->\n"
+ "</script>\n"
+ "</nav>\n"
+ "</header>\n"
+ "<main role=\"main\">\n"
+ "<div class=\"header\">");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/I.html", true,
// Test for 4664607
"<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
+ "<a name=\"navbar.top.firstrow\">\n"
+ "<!-- -->\n"
+ "</a>");
// Remaining tests check for additional padding to offset the fixed navigation bar.
checkOutput("pkg/A.html", true,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
......@@ -92,7 +136,8 @@ public class TestNavigation extends JavadocTester {
// Test for checking additional padding to offset the fixed navigation bar in HTML5.
@Test
void test1() {
javadoc("-d", "out-1", "-html5",
javadoc("-d", "out-1",
"-html5",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
......@@ -123,7 +168,8 @@ public class TestNavigation extends JavadocTester {
// Test to make sure that no extra padding for nav bar gets generated if -nonavbar is specified for HTML4.
@Test
void test2() {
javadoc("-d", "out-2", "-nonavbar",
javadoc("-d", "out-2",
"-nonavbar",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
......@@ -152,7 +198,9 @@ public class TestNavigation extends JavadocTester {
// Test to make sure that no extra padding for nav bar gets generated if -nonavbar is specified for HTML5.
@Test
void test3() {
javadoc("-d", "out-3", "-html5", "-nonavbar",
javadoc("-d", "out-3",
"-html5",
"-nonavbar",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 6758050 8025633
* @bug 6758050 8025633 8182765
* @summary Test HTML output for nested generic types.
* @author bpatel
* @library ../lib
......@@ -46,6 +46,20 @@ public class TestNestedGenerics extends JavadocTester {
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/NestedGenerics.html", true,
"<div class=\"block\">Contains <a " +
"href=\"#foo(java.util.Map)\"><code>foo" +
"(java.util.Map&lt;A, java.util.Map&lt;A, A&gt;&gt;)</code></a></div>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/NestedGenerics.html", true,
"<div class=\"block\">Contains <a " +
"href=\"#foo-java.util.Map-\"><code>foo" +
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8048628 8174715
* @bug 8048628 8174715 8182765
* @summary Verify html inline tags are removed correctly in the first sentence.
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
......@@ -43,7 +43,11 @@ public class TestNonInlineHtmlTagRemoval extends JavadocTester {
javadoc("-d", "out1",
"-sourcepath", testSrc,
testSrc("C.java"));
checkExit(Exit.OK);
checkExit(Exit.ERROR);
checkOutput(Output.OUT, true,
"attribute not supported in HTML5: compact",
"attribute not supported in HTML5: type");
checkOutput("C.html", true,
"<div class=\"block\">case1 end of sentence.</div>",
......@@ -59,6 +63,15 @@ public class TestNonInlineHtmlTagRemoval extends JavadocTester {
"<div class=\"block\">caseB A block quote example:</div>");
}
@Test
void testPositive_html4() {
javadoc("-d", "out1-html4",
"-html4",
"-sourcepath", testSrc,
testSrc("C.java"));
checkExit(Exit.OK);
}
@Test
void testNegative() {
javadoc("-d", "out2",
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4749567 8071982 8175200 8186332 8185371
* @bug 4749567 8071982 8175200 8186332 8185371 8182765
* @summary Test the output for -header, -footer, -nooverview, -nodeprecatedlist, -nonavbar, -notree,
* -stylesheetfile, --main-stylesheet, --add-stylesheet options.
* @author Bhavesh Patel
......@@ -198,7 +198,7 @@ public class TestOptions extends JavadocTester {
checkOutput("src-html/linksource/AnnotationTypeField.html", true,
"<title>Source code</title>",
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\">"
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\">"
+ "@Documented public @interface AnnotationTypeField {</a>");
checkOutput("linksource/Properties.html", true,
......@@ -211,7 +211,7 @@ public class TestOptions extends JavadocTester {
checkOutput("src-html/linksource/Properties.html", true,
"<title>Source code</title>",
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> "
+ "public Object someProperty() {</a>");
checkOutput("linksource/SomeClass.html", true,
......@@ -226,13 +226,13 @@ public class TestOptions extends JavadocTester {
checkOutput("src-html/linksource/SomeClass.html", true,
"<title>Source code</title>",
"<span class=\"sourceLineNo\">029</span><a name=\"line.29\">"
"<span class=\"sourceLineNo\">029</span><a id=\"line.29\">"
+ "public class SomeClass {</a>",
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> "
+ "public int field;</a>",
"<span class=\"sourceLineNo\">033</span><a name=\"line.33\"> "
"<span class=\"sourceLineNo\">033</span><a id=\"line.33\"> "
+ "public SomeClass() {</a>",
"<span class=\"sourceLineNo\">036</span><a name=\"line.36\"> "
"<span class=\"sourceLineNo\">036</span><a id=\"line.36\"> "
+ "public int method() {</a>");
checkOutput("linksource/SomeEnum.html", true,
......@@ -243,6 +243,40 @@ public class TestOptions extends JavadocTester {
+ "title=\"enum in linksource\">SomeEnum</a> <a href="
+ "\"../src-html/linksource/SomeEnum.html#line.30\">VALUE2</a></pre>");
checkOutput("src-html/linksource/SomeEnum.html", true,
"<span class=\"sourceLineNo\">029</span><a id=\"line.29\"> VALUE1,</a>",
"<span class=\"sourceLineNo\">030</span><a id=\"line.30\"> VALUE2</a>");
}
@Test
void testLinkSource_html4() {
javadoc("-d", "out-9-html4",
"-html4",
"-linksource",
"-javafx",
"-sourcepath", testSrc,
"-package",
"linksource");
checkExit(Exit.OK);
checkOutput("src-html/linksource/AnnotationTypeField.html", true,
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\">"
+ "@Documented public @interface AnnotationTypeField {</a>");
checkOutput("src-html/linksource/Properties.html", true,
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
+ "public Object someProperty() {</a>");
checkOutput("src-html/linksource/SomeClass.html", true,
"<span class=\"sourceLineNo\">029</span><a name=\"line.29\">"
+ "public class SomeClass {</a>",
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
+ "public int field;</a>",
"<span class=\"sourceLineNo\">033</span><a name=\"line.33\"> "
+ "public SomeClass() {</a>",
"<span class=\"sourceLineNo\">036</span><a name=\"line.36\"> "
+ "public int method() {</a>");
checkOutput("src-html/linksource/SomeEnum.html", true,
"<span class=\"sourceLineNo\">029</span><a name=\"line.29\"> VALUE1,</a>",
"<span class=\"sourceLineNo\">030</span><a name=\"line.30\"> VALUE2</a>");
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8039410 8042601 8042829 8049393 8050031 8155061 8155995 8167967 8169813
* @bug 8039410 8042601 8042829 8049393 8050031 8155061 8155995 8167967 8169813 8182765
* @summary test to determine if members are ordered correctly
* @library ../lib/
* @modules jdk.javadoc/jdk.javadoc.internal.tool
......@@ -93,9 +93,9 @@ public class TestOrdering extends JavadocTester {
String contents = tester.readFile(usePage);
// check constructors
tester.checking("constructors");
int idx1 = contents.indexOf("C.html#C-UsedInC");
int idx2 = contents.indexOf("C.html#C-UsedInC-int");
int idx3 = contents.indexOf("C.html#C-UsedInC-java.lang.String");
int idx1 = contents.indexOf("C.html#%3Cinit%3E(UsedInC");
int idx2 = contents.indexOf("C.html#%3Cinit%3E(UsedInC,int");
int idx3 = contents.indexOf("C.html#%3Cinit%3E(UsedInC,java.lang.String");
if (idx1 == -1 || idx2 == -1 || idx3 == -1) {
tester.failed("ctor strings not found");
} else if (idx1 > idx2 || idx2 > idx3 || idx1 > idx3) {
......@@ -106,8 +106,8 @@ public class TestOrdering extends JavadocTester {
// check methods
tester.checking("methods");
idx1 = contents.indexOf("C.html#ymethod-int");
idx2 = contents.indexOf("C.html#ymethod-java.lang.String");
idx1 = contents.indexOf("C.html#ymethod(int");
idx2 = contents.indexOf("C.html#ymethod(java.lang.String");
if (idx1 == -1 || idx2 == -1) {
tester.failed("#ymethod strings not found");
} else if (idx1 > idx2) {
......@@ -135,42 +135,42 @@ public class TestOrdering extends JavadocTester {
checkClassUseOrdering("pkg1/class-use/UsedClass.html");
tester.checkOrder("pkg1/class-use/UsedClass.html",
"../MethodOrder.html#m--",
"../MethodOrder.html#m-byte:A-",
"../MethodOrder.html#m-double-",
"../MethodOrder.html#m-double-double-",
"../MethodOrder.html#m-double-java.lang.Double-",
"../MethodOrder.html#m-int-",
"../MethodOrder.html#m-int-int-",
"../MethodOrder.html#m-int-java.lang.Integer-",
"../MethodOrder.html#m-long-",
"../MethodOrder.html#m-long-long-",
"../MethodOrder.html#m-long-java.lang.Long-",
"../MethodOrder.html#m-long-java.lang.Long...-",
"../MethodOrder.html#m-java.lang.Double-",
"../MethodOrder.html#m-java.lang.Double-double-",
"../MethodOrder.html#m-java.lang.Double-java.lang.Double-",
"../MethodOrder.html#m-java.lang.Integer-",
"../MethodOrder.html#m-java.lang.Integer-int-",
"../MethodOrder.html#m-java.lang.Integer-java.lang.Integer-",
"../MethodOrder.html#m-java.lang.Object:A-",
"../MethodOrder.html#m-java.util.ArrayList-",
"../MethodOrder.html#m-java.util.Collection-",
"../MethodOrder.html#m-java.util.List-");
"../MethodOrder.html#m()",
"../MethodOrder.html#m(byte%5B%5D)",
"../MethodOrder.html#m(double)",
"../MethodOrder.html#m(double,double)",
"../MethodOrder.html#m(double,java.lang.Double)",
"../MethodOrder.html#m(int)",
"../MethodOrder.html#m(int,int)",
"../MethodOrder.html#m(int,java.lang.Integer)",
"../MethodOrder.html#m(long)",
"../MethodOrder.html#m(long,long)",
"../MethodOrder.html#m(long,java.lang.Long)",
"../MethodOrder.html#m(long,java.lang.Long...)",
"../MethodOrder.html#m(java.lang.Double)",
"../MethodOrder.html#m(java.lang.Double,double)",
"../MethodOrder.html#m(java.lang.Double,java.lang.Double)",
"../MethodOrder.html#m(java.lang.Integer)",
"../MethodOrder.html#m(java.lang.Integer,int)",
"../MethodOrder.html#m(java.lang.Integer,java.lang.Integer)",
"../MethodOrder.html#m(java.lang.Object%5B%5D)",
"../MethodOrder.html#m(java.util.ArrayList)",
"../MethodOrder.html#m(java.util.Collection)",
"../MethodOrder.html#m(java.util.List)");
tester.checkOrder("pkg1/class-use/UsedClass.html",
"../MethodOrder.html#tpm-pkg1.UsedClass-",
"../MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass-",
"../MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass:A-",
"../MethodOrder.html#tpm-pkg1.UsedClass-java.lang.String-");
"../MethodOrder.html#tpm(pkg1.UsedClass)",
"../MethodOrder.html#tpm(pkg1.UsedClass,pkg1.UsedClass)",
"../MethodOrder.html#tpm(pkg1.UsedClass,pkg1.UsedClass%5B%5D)",
"../MethodOrder.html#tpm(pkg1.UsedClass,java.lang.String)");
tester.checkOrder("pkg1/class-use/UsedClass.html",
"../A.html#A-pkg1.UsedClass-",
"../B.A.html#A-pkg1.UsedClass-",
"../B.html#B-pkg1.UsedClass-",
"../A.C.html#C-pkg1.UsedClass-java.lang.Object:A-",
"../A.C.html#C-pkg1.UsedClass-java.util.Collection-",
"../A.C.html#C-pkg1.UsedClass-java.util.List-");
"../A.html#%3Cinit%3E(pkg1.UsedClass)",
"../B.A.html#%3Cinit%3E(pkg1.UsedClass)",
"../B.html#%3Cinit%3E(pkg1.UsedClass)",
"../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.lang.Object%5B%5D)",
"../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.util.Collection)",
"../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.util.List)");
tester.checkOrder("pkg1/ImplementsOrdering.html",
"<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd>",
......@@ -213,7 +213,7 @@ public class TestOrdering extends JavadocTester {
void checkClassUseOrdering(String usePage) {
checkClassUseOrdering(usePage, "C#ITERATION#.html#zfield");
checkClassUseOrdering(usePage, "C#ITERATION#.html#fieldInC#ITERATION#");
checkClassUseOrdering(usePage, "C#ITERATION#.html#zmethod-pkg1.UsedClass");
checkClassUseOrdering(usePage, "C#ITERATION#.html#zmethod(pkg1.UsedClass");
checkClassUseOrdering(usePage, "C#ITERATION#.html#methodInC#ITERATION#");
}
......@@ -346,17 +346,17 @@ public class TestOrdering extends JavadocTester {
};
static String expectedMethodOrdering[] = {
"Add.html#add--",
"Add.html#add-double-",
"Add.html#add-double-byte-",
"Add.html#add-double-double-",
"Add.html#add-double-java.lang.Double-",
"Add.html#add-float-",
"Add.html#add-float-int-",
"Add.html#add-int-",
"Add.html#add-int-float-",
"Add.html#add-java.lang.Double-",
"Add.html#add-java.lang.Integer-"
"Add.html#add()",
"Add.html#add(double)",
"Add.html#add(double,byte)",
"Add.html#add(double,double)",
"Add.html#add(double,java.lang.Double)",
"Add.html#add(float)",
"Add.html#add(float,int)",
"Add.html#add(int)",
"Add.html#add(int,float)",
"Add.html#add(java.lang.Double)",
"Add.html#add(java.lang.Integer)"
};
static String expectedPackageOrdering[] = {
......@@ -593,10 +593,10 @@ public class TestOrdering extends JavadocTester {
tester.checkOrder("pkg5/AnnoOptionalTest.html",
"<h3>Optional Element Summary</h3>",
"<a href=\"#four--\">four</a>",
"<a href=\"#one--\">one</a>",
"<a href=\"#three--\">three</a>",
"<a href=\"#two--\">two</a>",
"<a href=\"#four()\">four</a>",
"<a href=\"#one()\">one</a>",
"<a href=\"#three()\">three</a>",
"<a href=\"#two()\">two</a>",
"<h3>Element Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
......@@ -605,10 +605,10 @@ public class TestOrdering extends JavadocTester {
tester.checkOrder("pkg5/AnnoRequiredTest.html",
"<h3>Required Element Summary</h3>",
"<a href=\"#four--\">four</a>",
"<a href=\"#one--\">one</a>",
"<a href=\"#three--\">three</a>",
"<a href=\"#two--\">two</a>",
"<a href=\"#four()\">four</a>",
"<a href=\"#one()\">one</a>",
"<a href=\"#three()\">three</a>",
"<a href=\"#two()\">two</a>",
"<h3>Element Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
......@@ -617,15 +617,15 @@ public class TestOrdering extends JavadocTester {
tester.checkOrder("pkg5/CtorTest.html",
"<h3>Constructor Summary</h3>",
"<a href=\"#CtorTest-int-\"",
"<a href=\"#CtorTest-int-int-\"",
"<a href=\"#CtorTest-int-int-int-\"",
"<a href=\"#CtorTest-int-int-int-int-\"",
"<a href=\"#%3Cinit%3E(int)\"",
"<a href=\"#%3Cinit%3E(int,int)\"",
"<a href=\"#%3Cinit%3E(int,int,int)\"",
"<a href=\"#%3Cinit%3E(int,int,int,int)\"",
"<h3>Constructor Detail</h3>",
"<a name=\"CtorTest-int-int-int-int-\">",
"<a name=\"CtorTest-int-int-int-\">",
"<a name=\"CtorTest-int-int-\">",
"<a name=\"CtorTest-int-\">");
"<a id=\"&lt;init&gt;(int,int,int,int)\">",
"<a id=\"&lt;init&gt;(int,int,int)\">",
"<a id=\"&lt;init&gt;(int,int)\">",
"<a id=\"&lt;init&gt;(int)\">");
tester.checkOrder("pkg5/EnumTest.html",
"<h3>Enum Constant Summary</h3>",
......@@ -653,10 +653,10 @@ public class TestOrdering extends JavadocTester {
tester.checkOrder("pkg5/IntfTest.html",
"<h3>Method Summary</h3>",
"<a href=\"#four--\">four</a>",
"<a href=\"#one--\">one</a>",
"<a href=\"#three--\">three</a>",
"<a href=\"#two--\">two</a>",
"<a href=\"#four()\">four</a>",
"<a href=\"#one()\">one</a>",
"<a href=\"#three()\">three</a>",
"<a href=\"#two()\">two</a>",
"<h3>Method Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
......@@ -665,10 +665,10 @@ public class TestOrdering extends JavadocTester {
tester.checkOrder("pkg5/MethodTest.html",
"<h3>Method Summary</h3>",
"<a href=\"#four--\">four</a>",
"<a href=\"#one--\">one</a>",
"<a href=\"#three--\">three</a>",
"<a href=\"#two--\">two</a>",
"<a href=\"#four()\">four</a>",
"<a href=\"#one()\">one</a>",
"<a href=\"#three()\">three</a>",
"<a href=\"#two()\">two</a>",
"<h3>Method Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
......@@ -686,6 +686,25 @@ public class TestOrdering extends JavadocTester {
"<h4>twoProperty</h4>",
"<h4>threeProperty</h4>",
"<h4>fourProperty</h4>");
tester.javadoc("-d", "out-5-html4",
"-html4",
"-javafx",
"-sourcepath", tester.testSrc(new File(".").getPath()),
"pkg5"
);
tester.checkExit(Exit.OK);
tester.checkOrder("pkg5/CtorTest.html",
"<a href=\"#CtorTest-int-\"",
"<a href=\"#CtorTest-int-int-\"",
"<a href=\"#CtorTest-int-int-int-\"",
"<a href=\"#CtorTest-int-int-int-int-\"",
"<a name=\"CtorTest-int-int-int-int-\">",
"<a name=\"CtorTest-int-int-int-\">",
"<a name=\"CtorTest-int-int-\">",
"<a name=\"CtorTest-int-\">");
}
}
}
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4368820 8025633 8026567
* @bug 4368820 8025633 8026567 8182765
* @summary Inherited comment should link directly to member, not just
* class
* @author jamieh
......@@ -51,6 +51,20 @@ public class TestOverriddenMethodDocCopy extends JavadocTester {
"pkg1", "pkg2");
checkExit(Exit.OK);
checkOutput("pkg1/SubClass.html", true,
"<span class=\"descfrmTypeLabel\">Description copied from class:&nbsp;<code>"
+ "<a href=\"BaseClass.html#overridenMethodWithDocsToCopy()\">"
+ "BaseClass</a></code></span>");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg1", "pkg2");
checkExit(Exit.OK);
checkOutput("pkg1/SubClass.html", true,
"<span class=\"descfrmTypeLabel\">Description copied from class:&nbsp;<code>"
+ "<a href=\"BaseClass.html#overridenMethodWithDocsToCopy--\">"
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4634891 8025633 8026567
* @bug 4634891 8025633 8026567 8182765
* @summary Determine if overridden methods are properly documented when
* -protected (default) visibility flag is used.
* @author jamieh
......@@ -48,6 +48,54 @@ public class TestOverriddenPrivateMethodsWithPackageFlag extends JavadocTester {
"pkg1", "pkg2");
checkExit(Exit.OK);
// The public method should be overridden
checkOutput("pkg1/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"BaseClass.html#publicMethod()\">"
+ "publicMethod</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
// The public method in different package should be overridden
checkOutput("pkg2/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">"
+ "publicMethod</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
// The package private method should be overridden since the base and sub class are in the same
// package.
checkOutput("pkg1/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"BaseClass.html#packagePrivateMethod()\">"
+ "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
// The private method in should not be overridden
checkOutput("pkg1/SubClass.html", false,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"BaseClass.html#privateMethod--\">");
// The private method in different package should not be overridden
checkOutput("pkg2/SubClass.html", false,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod--\">");
// The package private method should not be overridden since the base and sub class are in
// different packages.
checkOutput("pkg2/SubClass.html", false,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod--\">");
}
@Test
void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"-package",
"pkg1", "pkg2");
checkExit(Exit.OK);
// The public method should be overridden
checkOutput("pkg1/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8157000 8192850
* @bug 8157000 8192850 8182765
* @summary test the behavior of --override-methods option
* @library ../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
......@@ -94,11 +94,11 @@ public class TestOverrideMethods extends JavadocTester {
// Check method summary
"Method Summary",
"void",
"#m1--\">m1",
"#m1()\">m1",
"A modified method",
"void",
"#m4-java.lang.String-java.lang.String-\">m4",
"#m4(java.lang.String,java.lang.String)\">m4",
"java.lang.String&nbsp;k,",
"java.lang.String",
"&nbsp;v)",
......@@ -106,12 +106,12 @@ public class TestOverrideMethods extends JavadocTester {
// Check footnotes
"Methods declared in class&nbsp;pkg5.<a href=\"Classes.GP.html",
"Classes.GP",
"Classes.GP.html#m0--\">m0",
"Classes.GP.html#m0()\">m0",
// Check method details for override
"overrideSpecifyLabel",
"Overrides:",
"Classes.GP.html#m7--\">m7",
"Classes.GP.html#m7()\">m7",
"in class",
"Classes.GP.html",
"Classes.GP"
......@@ -120,47 +120,47 @@ public class TestOverrideMethods extends JavadocTester {
checkOrder("pkg5/Classes.C.html",
// Check footnotes 2
"Methods declared in class&nbsp;pkg5.",
"Classes.P.html#getRate--\">getRate",
"Classes.P.html#m2--\">m2",
"Classes.P.html#m3--\">m3",
"Classes.P.html#m4-K-V-\">m4",
"Classes.P.html#rateProperty--\">rateProperty",
"Classes.P.html#setRate-double-\">setRate",
"Classes.P.html#getRate()\">getRate",
"Classes.P.html#m2()\">m2",
"Classes.P.html#m3()\">m3",
"Classes.P.html#m4(K,V)\">m4",
"Classes.P.html#rateProperty()\">rateProperty",
"Classes.P.html#setRate(double)\">setRate",
// Check @link
"A test of links to the methods in this class. <p>\n",
"Classes.GP.html#m0--",
"Classes.GP.html#m0()",
"Classes.GP.m0()",
"#m1--",
"#m1()",
"m1()",
"Classes.P.html#m2--",
"Classes.P.html#m2()",
"Classes.P.m2()",
"Classes.P.html#m3--",
"Classes.P.html#m3()",
"Classes.P.m3()",
"m4(java.lang.String,java.lang.String)",
"Classes.P.html#m5--",
"Classes.P.html#m5()",
"Classes.P.m5()",
"#m6--",
"#m6()",
"m6()",
"#m7--",
"#m7()",
"m7()",
"End of links",
// Check @see
"See Also:",
"Classes.GP.html#m0--",
"Classes.GP.html#m0()",
"Classes.GP.m0()",
"#m1--",
"#m1()",
"m1()",
"Classes.P.html#m2--",
"Classes.P.html#m2()",
"Classes.P.m2()",
"Classes.P.html#m3--",
"Classes.P.html#m3()",
"Classes.P.m3()",
"#m4-java.lang.String-java.lang.String-",
"#m4(java.lang.String,java.lang.String)",
"m4(String k, String v)",
"Classes.P.html#m5--\"><code>Classes.P.m5()",
"#m6--\"><code>m6()",
"#m7--\"><code>m7()"
"Classes.P.html#m5()\"><code>Classes.P.m5()",
"#m6()\"><code>m6()",
"#m7()\"><code>m7()"
);
// Tests for interfaces
......@@ -172,24 +172,24 @@ public class TestOverrideMethods extends JavadocTester {
checkOrder("pkg5/Interfaces.D.html",
"Start of links <p>",
"Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
"Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
"Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
"Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
"#m--\"><code>m()",
"#n--\"><code>n()",
"Interfaces.C.html#o--\"><code>Interfaces.C.o()",
"Interfaces.A.html#m0()\"><code>Interfaces.A.m0()",
"Interfaces.A.html#m1()\"><code>Interfaces.A.m1()",
"Interfaces.A.html#m2()\"><code>Interfaces.A.m2()",
"Interfaces.A.html#m3()\"><code>Interfaces.A.m3()",
"#m()\"><code>m()",
"#n()\"><code>n()",
"Interfaces.C.html#o()\"><code>Interfaces.C.o()",
"End of links",
// Check @see links
"See Also:",
"Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
"Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
"Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
"Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
"#m--\"><code>m()",
"#n--\"><code>n()",
"Interfaces.C.html#o--\"><code>Interfaces.C.o()",
"Interfaces.A.html#m0()\"><code>Interfaces.A.m0()",
"Interfaces.A.html#m1()\"><code>Interfaces.A.m1()",
"Interfaces.A.html#m2()\"><code>Interfaces.A.m2()",
"Interfaces.A.html#m3()\"><code>Interfaces.A.m3()",
"#m()\"><code>m()",
"#n()\"><code>n()",
"Interfaces.C.html#o()\"><code>Interfaces.C.o()",
// Check properties
"Properties declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html\" "
......@@ -209,24 +209,128 @@ public class TestOverrideMethods extends JavadocTester {
// Check Method Summary
"Method Summary",
"#m--\">m",
"#n--\">n",
"#m()\">m",
"#n()\">n",
// Check footnotes
"Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html",
"Interfaces.A.html#getRate()\">getRate",
"Interfaces.A.html#rateProperty()\">rateProperty",
"Interfaces.A.html#setRate(double)",
"Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.B.html",
"Interfaces.B.html#m1()\">m1",
"Interfaces.B.html#m3()\">m3",
"Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.C.html",
"<a href=\"Interfaces.C.html#o()\">o</a>"
);
// Test synthetic values and valuesof of an enum.
checkOrder("index-all.html",
"<h2 class=\"title\">M</h2>",
"<a href=\"pkg5/Interfaces.C.html#m()\">m()",
"<a href=\"pkg5/Interfaces.D.html#m()\">m()</a>",
"<a href=\"pkg5/Classes.GP.html#m0()\">m0()",
"<a href=\"pkg5/Interfaces.A.html#m0()\">m0()</a>",
"<a href=\"pkg5/Classes.C.html#m1()\">m1()</a>",
"<a href=\"pkg5/Classes.P.html#m1()\">m1()</a>",
"<a href=\"pkg5/Interfaces.A.html#m1()\">m1()</a>",
"<a href=\"pkg5/Interfaces.B.html#m1()\">m1()</a>",
"<a href=\"pkg5/Classes.P.html#m2()\">m2()</a>",
"<a href=\"pkg5/Interfaces.A.html#m2()\">m2()</a>",
"<a href=\"pkg5/Classes.P.html#m3()\">m3()</a>",
"<a href=\"pkg5/Interfaces.A.html#m3()\">m3()</a>",
"<a href=\"pkg5/Interfaces.B.html#m3()\">m3()</a>",
"<a href=\"pkg5/Classes.C.html#m4(java.lang.String,java.lang.String)\">m4(String, String)</a>",
"<a href=\"pkg5/Classes.P.html#m4(K,V)\">m4(K, V)</a>",
"<a href=\"pkg5/Classes.P.html#m5()\">m5()</a>",
"<a href=\"pkg5/Classes.C.html#m6()\">m6()</a>",
"<a href=\"pkg5/Classes.P.html#m6()\">m6()</a>",
"<a href=\"pkg5/Classes.C.html#m7()\">m7()</a>",
"<a href=\"pkg5/Classes.GP.html#m7()\">m7()</a>",
"Returns the enum constant of this type with the specified name.",
"Returns an array containing the constants of this enum type, in\n" +
"the order they are declared."
);
}
@Test
void testSummary_html4() {
javadoc("-d", "out-summary-html4",
"-html4",
"-sourcepath", testSrc,
"-javafx",
"--override-methods=summary",
"pkg5");
checkExit(Exit.OK);
checkOrder("pkg5/Classes.C.html",
"#m1--\">m1",
"#m4-java.lang.String-java.lang.String-\">m4",
"Classes.GP.html#m0--\">m0",
"Classes.GP.html#m7--\">m7"
);
checkOrder("pkg5/Classes.C.html",
// Check footnotes 2
"Classes.P.html#getRate--\">getRate",
"Classes.P.html#m2--\">m2",
"Classes.P.html#m3--\">m3",
"Classes.P.html#m4-K-V-\">m4",
"Classes.P.html#rateProperty--\">rateProperty",
"Classes.P.html#setRate-double-\">setRate",
// Check @link
"Classes.GP.html#m0--",
"#m1--",
"Classes.P.html#m2--",
"Classes.P.html#m3--",
"Classes.P.html#m5--",
"#m6--",
"#m7--",
// Check @see
"Classes.GP.html#m0--",
"#m1--",
"Classes.P.html#m2--",
"Classes.P.html#m3--",
"#m4-java.lang.String-java.lang.String-",
"Classes.P.html#m5--\"><code>Classes.P.m5()",
"#m6--\"><code>m6()",
"#m7--\"><code>m7()"
);
// Tests for interfaces
// Make sure the static methods in the super interface
// do not make it to this interface
checkOrder("pkg5/Interfaces.D.html",
"Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
"Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
"Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
"Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
"#m--\"><code>m()",
"#n--\"><code>n()",
"Interfaces.C.html#o--\"><code>Interfaces.C.o()",
"Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
"Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
"Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
"Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
"#m--\"><code>m()",
"#n--\"><code>n()",
"Interfaces.C.html#o--\"><code>Interfaces.C.o()",
"#m--\">m",
"#n--\">n",
"Interfaces.A.html#getRate--\">getRate",
"Interfaces.A.html#rateProperty--\">rateProperty",
"Interfaces.A.html#setRate-double-",
"Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.B.html",
"Interfaces.B.html#m1--\">m1",
"Interfaces.B.html#m3--\">m3",
"Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.C.html",
"<a href=\"Interfaces.C.html#o--\">o</a>"
);
// Test synthetic values and valuesof of an enum.
checkOrder("index-all.html",
"<h2 class=\"title\">M</h2>",
"<a href=\"pkg5/Interfaces.C.html#m--\">m()",
"<a href=\"pkg5/Interfaces.D.html#m--\">m()</a>",
"<a href=\"pkg5/Classes.GP.html#m0--\">m0()",
......@@ -246,10 +350,7 @@ public class TestOverrideMethods extends JavadocTester {
"<a href=\"pkg5/Classes.C.html#m6--\">m6()</a>",
"<a href=\"pkg5/Classes.P.html#m6--\">m6()</a>",
"<a href=\"pkg5/Classes.C.html#m7--\">m7()</a>",
"<a href=\"pkg5/Classes.GP.html#m7--\">m7()</a>",
"Returns the enum constant of this type with the specified name.",
"Returns an array containing the constants of this enum type, in\n" +
"the order they are declared."
"<a href=\"pkg5/Classes.GP.html#m7--\">m7()</a>"
);
}
}
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8173302
* @bug 8173302 8182765
* @summary make sure the overview-summary and module-summary pages don't
* don't have the See link, and the overview is copied correctly.
* @library ../lib
......@@ -48,15 +48,20 @@ public class TestOverview extends JavadocTester {
"-sourcepath", testSrc("src"),
"p1", "p2");
checkExit(Exit.OK);
checkOutput("overview-summary.html", true,
"<div class=\"header\">\n"
+ "<h1 class=\"title\">Document Title</h1>\n"
+ "</div>\n"
+ "<div class=\"contentContainer\">\n"
+ "<div class=\"block\">This is line1. This is line 2.</div>\n"
+ "</div>\n"
+ "<div class=\"contentContainer\">"
);
checkOverview();
}
@Test
void test1_html4() {
javadoc("-d", "out-1-html4",
"-html4",
"-doctitle", "Document Title",
"-windowtitle", "Window Title",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc("src"),
"p1", "p2");
checkExit(Exit.OK);
checkOverview_html4();
}
@Test
......@@ -68,6 +73,35 @@ public class TestOverview extends JavadocTester {
"-sourcepath", testSrc("msrc"),
"p1", "p2");
checkExit(Exit.OK);
checkOverview();
}
@Test
void test2_html4() {
javadoc("-d", "out-2-html4",
"-html4",
"-doctitle", "Document Title",
"-windowtitle", "Window Title",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc("msrc"),
"p1", "p2");
checkExit(Exit.OK);
checkOverview_html4();
}
void checkOverview() {
checkOutput("overview-summary.html", true,
"<div class=\"header\">\n"
+ "<h1 class=\"title\">Document Title</h1>\n"
+ "</div>\n"
+ "<main role=\"main\">\n"
+ "<div class=\"contentContainer\">\n"
+ "<div class=\"block\">This is line1. This is line 2.</div>\n"
+ "</div>\n"
+ "<div class=\"contentContainer\">");
}
void checkOverview_html4() {
checkOutput("overview-summary.html", true,
"<div class=\"header\">\n"
+ "<h1 class=\"title\">Document Title</h1>\n"
......@@ -75,7 +109,6 @@ public class TestOverview extends JavadocTester {
+ "<div class=\"contentContainer\">\n"
+ "<div class=\"block\">This is line1. This is line 2.</div>\n"
+ "</div>\n"
+ "<div class=\"contentContainer\">"
);
+ "<div class=\"contentContainer\">");
}
}
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8185194
* @bug 8185194 8182765
* @summary Test anchor for package description in package summary page
* @library ../lib/
* @modules jdk.javadoc/jdk.javadoc.internal.tool
......@@ -42,8 +42,7 @@ public class TestPackageDescription extends JavadocTester {
void test1() {
javadoc("-d", "out",
"-sourcepath", testSrc,
"pkg",
"-html5");
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/package-summary.html", true,
......@@ -56,6 +55,7 @@ public class TestPackageDescription extends JavadocTester {
@Test
void test2() {
javadoc("-d", "out-2",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4780441 4874845 4978816 8014017 8016328 8025633 8026567 8175200
* @bug 4780441 4874845 4978816 8014017 8016328 8025633 8026567 8175200 8182765
* @summary Make sure that when the -private flag is not used, members
* inherited from package private class are documented in the child.
*
......@@ -42,7 +42,6 @@
* @build JavadocTester
* @run main TestPrivateClasses
*/
public class TestPrivateClasses extends JavadocTester {
public static void main(String... args) throws Exception {
......@@ -62,7 +61,7 @@ public class TestPrivateClasses extends JavadocTester {
"<a href=\"#fieldInheritedFromParent\">"
+ "fieldInheritedFromParent</a>",
// Method inheritance from non-public superclass.
"<a href=\"#methodInheritedFromParent-int-\">"
"<a href=\"#methodInheritedFromParent(int)\">"
+ "methodInheritedFromParent</a>",
// private class does not show up in tree
"<ul class=\"inheritance\">\n"
......@@ -94,15 +93,15 @@ public class TestPrivateClasses extends JavadocTester {
checkOutput("pkg/PublicChild.html", false,
// Should not document comments from private inherited interfaces
"<td class=\"colLast\"><code><span class=\"memberNameLink\">" +
"<a href=\"#methodInterface-int-\">" +
"methodInterface</a></span>&#8203;(int&nbsp;p1)</code>\n" +
"<div class=\"block\">Comment from interface.</div>\n</td>",
"<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#methodInterface(int)\">"
+ "methodInterface</a></span>&#8203;(int&nbsp;p1)</code>\n"
+ "<div class=\"block\">Comment from interface.</div>\n</td>",
// and similarly one more
"<td class=\"colLast\"><code><span class=\"memberNameLink\">" +
"<a href=\"#methodInterface2-int-\">" +
"methodInterface2</a></span>&#8203;(int&nbsp;p1)</code>\n" +
"<div class=\"block\">Comment from interface.</div>\n</td>"
"<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#methodInterface2(int)\">"
+ "methodInterface2</a></span>&#8203;(int&nbsp;p1)</code>\n"
+ "<div class=\"block\">Comment from interface.</div>\n</td>"
);
checkOutput("pkg/PublicInterface.html", true,
......@@ -110,7 +109,7 @@ public class TestPrivateClasses extends JavadocTester {
"<a href=\"#fieldInheritedFromInterface\">"
+ "fieldInheritedFromInterface</a>",
// Method inheritance from non-public superinterface.
"<a href=\"#methodInterface-int-\">"
"<a href=\"#methodInterface(int)\">"
+ "methodInterface</a>",
//Make sure implemented interfaces from private superclass are inherited
"<dl>\n"
......@@ -132,13 +131,49 @@ public class TestPrivateClasses extends JavadocTester {
checkOutput("pkg2/C.html", false,
//Do not inherit private interface method with generic parameters.
//This method has been implemented.
"<span class=\"memberNameLink\"><a href=\"I.html#hello-T-\">hello</a></span>");
"<span class=\"memberNameLink\"><a href=\"I.html#hello(T)\">hello</a></span>");
checkOutput("constant-values.html", false,
// Make inherited constant are documented correctly.
"PrivateInterface");
}
@Test
void testDefault_html4() {
javadoc("-d", "out-default-html4",
"-html4",
"-sourcepath", testSrc,
"pkg", "pkg2");
checkExit(Exit.OK);
checkOutput("pkg/PublicChild.html", true,
// Method inheritance from non-public superclass.
"<a href=\"#methodInheritedFromParent-int-\">");
checkOutput("pkg/PublicChild.html", false,
// Should not document comments from private inherited interfaces
"<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#methodInterface-int-\">"
+ "methodInterface</a></span>&#8203;(int&nbsp;p1)</code>\n"
+ "<div class=\"block\">Comment from interface.</div>\n</td>",
// and similarly one more
"<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#methodInterface2-int-\">"
+ "methodInterface2</a></span>&#8203;(int&nbsp;p1)</code>\n"
+ "<div class=\"block\">Comment from interface.</div>\n</td>"
);
checkOutput("pkg/PublicInterface.html", true,
// Method inheritance from non-public superinterface.
"<a href=\"#methodInterface-int-\">"
+ "methodInterface</a>");
checkOutput("pkg2/C.html", false,
//Do not inherit private interface method with generic parameters.
//This method has been implemented.
"<span class=\"memberNameLink\"><a href=\"I.html#hello-T-\">hello</a></span>");
}
@Test
void testPrivate() {
javadoc("-d", "out-private",
......@@ -158,17 +193,17 @@ public class TestPrivateClasses extends JavadocTester {
"Methods inherited from class&nbsp;pkg."
+ "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
+ "PrivateParent</a>",
"<a href=\"PrivateParent.html#methodInheritedFromParent-int-\">"
"<a href=\"PrivateParent.html#methodInheritedFromParent(int)\">"
+ "methodInheritedFromParent</a>",
// Should document that a method overrides method from private class.
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">"
+ "<dd><code><a href=\"PrivateParent.html#methodOverridenFromParent(char%5B%5D,int,T,V,java.util.List)\">"
+ "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
+ "PrivateParent</a></code></dd>",
// Should document that a method is specified by private interface.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"PrivateInterface.html#methodInterface-int-\">"
+ "<dd><code><a href=\"PrivateInterface.html#methodInterface(int)\">"
+ "methodInterface</a></code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
+ "PrivateInterface</a></code></dd>",
......@@ -209,7 +244,7 @@ public class TestPrivateClasses extends JavadocTester {
+ "</dl>");
checkOutput("pkg/PrivateInterface.html", true,
"<a href=\"#methodInterface-int-\">"
"<a href=\"#methodInterface(int)\">"
+ "methodInterface</a>"
);
......@@ -217,9 +252,9 @@ public class TestPrivateClasses extends JavadocTester {
//Since private flag is used, we can document that private interface method
//with generic parameters has been implemented.
"<span class=\"descfrmTypeLabel\">Description copied from interface:&nbsp;<code>"
+ "<a href=\"I.html#hello-T-\">I</a></code></span>",
+ "<a href=\"I.html#hello(T)\">I</a></code></span>",
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"I.html#hello-T-\">hello</a></code>"
+ "<dd><code><a href=\"I.html#hello(T)\">hello</a></code>"
+ "&nbsp;in interface&nbsp;<code>"
+ "<a href=\"I.html\" title=\"interface in pkg2\">I</a>"
+ "&lt;java.lang.String&gt;</code></dd>");
......@@ -232,4 +267,46 @@ public class TestPrivateClasses extends JavadocTester {
checkOutput("pkg/PrivateParent.html", false,
"<pre> class <span class=\"typeNameLabel\">PrivateParent</span>");
}
@Test
void testPrivate_html4() {
javadoc("-d", "out-private-html4",
"-html4",
"-sourcepath", testSrc,
"-private",
"pkg", "pkg2");
checkExit(Exit.OK);
checkOutput("pkg/PublicChild.html", true,
"<a href=\"PrivateParent.html#methodInheritedFromParent-int-\">"
+ "methodInheritedFromParent</a>",
// Should document that a method overrides method from private class.
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">"
+ "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
+ "PrivateParent</a></code></dd>",
// Should document that a method is specified by private interface.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"PrivateInterface.html#methodInterface-int-\">"
+ "methodInterface</a></code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
+ "PrivateInterface</a></code></dd>");
checkOutput("pkg/PrivateInterface.html", true,
"<a href=\"#methodInterface-int-\">"
+ "methodInterface</a>"
);
checkOutput("pkg2/C.html", true,
//Since private flag is used, we can document that private interface method
//with generic parameters has been implemented.
"<span class=\"descfrmTypeLabel\">Description copied from interface:&nbsp;<code>"
+ "<a href=\"I.html#hello-T-\">I</a></code></span>",
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"I.html#hello-T-\">hello</a></code>"
+ "&nbsp;in interface&nbsp;<code>"
+ "<a href=\"I.html\" title=\"interface in pkg2\">I</a>"
+ "&lt;java.lang.String&gt;</code></dd>");
}
}
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 6958836 8002168
* @bug 6958836 8002168 8182765
* @summary javadoc should support -Xmaxerrs and -Xmaxwarns
* @modules jdk.javadoc/jdk.javadoc.internal.tool
*/
......@@ -63,7 +63,6 @@ public class Test {
// For some reason, this must be the first option when used.
opts.addAll(list("-locale", "en_US"));
opts.add("-Xdoclint:none");
opts.add("-html4");
opts.addAll(list("-classpath", System.getProperty("test.src")));
opts.addAll(list("-d", testOutDir.getPath()));
opts.addAll(testOpts);
......
......@@ -58,7 +58,6 @@ public class TestStdDoclet {
cmdArgs.addAll(Arrays.asList(
"-classpath", ".", // insulates us from ambient classpath
"-Xdoclint:none",
"-html4",
"-package",
new File(testSrc, thisClassName + ".java").getPath()
));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册