/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363
* 8168766 8168688 8162674 8160196 8175799 8174974 8176778 8177562 8175218
* 8175823 8166306 8178043 8181622 8183511 8169819 8074407 8183037 8191464
8164407 8192007 8182765 8196200 8196201 8196202 8196202 8205593 8202462
8184205
* @summary Test modules support in javadoc.
* @author bpatel
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
* @build javadoc.tester.*
* @run main TestModules
*/
import javadoc.tester.JavadocTester;
public class TestModules extends JavadocTester {
public static void main(String... args) throws Exception {
TestModules tester = new TestModules();
tester.runTests();
}
/**
* Test generated module pages for HTML 4.
*/
@Test
public void testHtml4() {
javadoc("-d", "out",
"-html4",
"-use",
"-Xdoclint:none",
"-overview", testSrc("overview.html"),
"--frames",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkDescription(true);
checkNoDescription(false);
checkOverviewSummaryModules();
checkModuleLink();
checkModuleClickThroughLinks();
checkModuleClickThrough(true);
checkModuleFilesAndLinks(true);
checkModulesInSearch(true);
checkOverviewFrame(true);
checkAllPkgsAllClasses(false);
}
/**
* Test generated module pages for HTML 5.
*/
@Test
public void testHtml5() {
javadoc("-d", "out-html5",
"-use",
"-Xdoclint:none",
"-overview", testSrc("overview.html"),
"--frames",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkHtml5Description(true);
checkHtml5NoDescription(false);
checkHtml5OverviewSummaryModules();
checkModuleLink();
checkModuleClickThroughLinks();
checkModuleClickThrough(true);
checkModuleFilesAndLinks(true);
checkModulesInSearch(true);
checkOverviewFrame(true);
checkAllPkgsAllClasses(true);
}
/**
* Test generated module pages for HTML 4 with -nocomment option.
*/
@Test
public void testHtml4NoComment() {
javadoc("-d", "out-nocomment",
"-html4",
"-nocomment",
"-use",
"-Xdoclint:none",
"--frames",
"-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkDescription(false);
checkNoDescription(true);
checkModuleLink();
checkModuleFilesAndLinks(true);
checkOverviewFrame(true);
}
/**
* Test generated module pages for HTML 5 with -nocomment option.
*/
@Test
public void testHtml5NoComment() {
javadoc("-d", "out-html5-nocomment",
"-nocomment",
"-use",
"-Xdoclint:none",
"--frames",
"-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkHtml5Description(false);
checkHtml5NoDescription(true);
checkModuleLink();
checkModuleFilesAndLinks(true);
checkOverviewFrame(true);
}
/**
* Test generated pages, in an unnamed module, for HTML 4.
*/
@Test
public void testHtml4UnnamedModule() {
javadoc("-d", "out-nomodule",
"-html4",
"-use",
"--frames",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"testpkgnomodule", "testpkgnomodule1");
checkExit(Exit.OK);
checkOverviewSummaryPackages();
checkModuleClickThrough(false);
checkModuleFilesAndLinks(false);
checkModulesInSearch(false);
checkOverviewFrame(false);
}
/**
* Test generated pages, in an unnamed module, for HTML 5.
*/
@Test
public void testHtml5UnnamedModule() {
javadoc("-d", "out-html5-nomodule",
"-use",
"--frames",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"testpkgnomodule", "testpkgnomodule1");
checkExit(Exit.OK);
checkHtml5OverviewSummaryPackages();
checkModuleFilesAndLinks(false);
checkModulesInSearch(false);
checkOverviewFrame(false);
}
/**
* Test generated module pages with javadoc tags.
*/
@Test
public void testJDTagsInModules() {
javadoc("-d", "out-mdltags",
"-author",
"-version",
"-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"--module", "moduletags,moduleB",
"testpkgmdltags", "testpkgmdlB");
checkExit(Exit.OK);
checkModuleTags();
}
/**
* Test generated module pages with javadoc tags.
*/
@Test
public void testJDTagsInModules_html4() {
javadoc("-d", "out-mdltags-html4",
"-html4",
"-author",
"-version",
"-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"--module", "moduletags,moduleB",
"testpkgmdltags", "testpkgmdlB");
checkExit(Exit.OK);
checkModuleTags_html4();
}
/**
* Test generated module summary page.
*/
@Test
public void testModuleSummary() {
javadoc("-d", "out-moduleSummary",
"-use",
"-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB", "moduleB/testpkg2mdlB");
checkExit(Exit.OK);
checkModuleSummary();
checkNegatedModuleSummary();
}
/**
* Test generated module summary page.
*/
@Test
public void testModuleSummary_html4() {
javadoc("-d", "out-moduleSummary-html4",
"-html4",
"-use",
"-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB", "moduleB/testpkg2mdlB");
checkExit(Exit.OK);
checkModuleSummary_html4();
checkNegatedModuleSummary_html4();
}
/**
* Test generated module summary page of an aggregating module.
*/
@Test
public void testAggregatorModuleSummary() {
javadoc("-d", "out-aggregatorModuleSummary",
"-use",
"--module-source-path", testSrc,
"--expand-requires", "transitive",
"--module", "moduleT");
checkExit(Exit.OK);
checkAggregatorModuleSummary();
}
/**
* Test generated module pages and pages with link to modules.
*/
@Test
public void testModuleFilesAndLinks() {
javadoc("-d", "out-modulelinks",
"-Xdoclint:none",
"--frames",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkModuleFilesAndLinks(true);
checkOverviewFrame(true);
}
/**
* Test generated module pages for a deprecated module.
*/
@Test
public void testModuleDeprecation() {
javadoc("-d", "out-moduledepr",
"-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB,moduletags",
"testpkgmdlA", "testpkgmdlB", "testpkgmdltags");
checkExit(Exit.OK);
checkModuleDeprecation(true);
}
/**
* Test annotations on modules.
*/
@Test
public void testModuleAnnotation() {
javadoc("-d", "out-moduleanno",
"-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkModuleAnnotation();
}
/**
* Test annotations on modules.
*/
@Test
public void testModuleAnnotation_html4() {
javadoc("-d", "out-moduleanno-html4",
"-html4",
"-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkModuleAnnotation_html4();
}
/**
* Test module summary pages in "api" mode.
*/
@Test
public void testApiMode() {
javadoc("-d", "out-api",
"-use",
"--show-module-contents=api",
"-author",
"-version",
"-Xdoclint:none",
"--frames",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB,moduleC,moduletags",
"testpkgmdlA", "moduleA/concealedpkgmdlA", "testpkgmdlB", "testpkg2mdlB", "testpkgmdlC", "testpkgmdltags");
checkExit(Exit.OK);
checkModuleModeCommon();
checkModuleModeApi(true);
checkModuleModeAll(false);
checkModuleFrameFiles(true);
checkAllModulesLink(true);
}
/**
* Test module summary pages in "all" mode.
*/
@Test
public void testAllMode() {
javadoc("-d", "out-all",
"-use",
"--show-module-contents=all",
"-author",
"-version",
"-Xdoclint:none",
"--frames",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB,moduleC,moduletags",
"testpkgmdlA", "moduleA/concealedpkgmdlA", "testpkgmdlB", "testpkg2mdlB", "testpkgmdlC", "testpkgmdltags");
checkExit(Exit.OK);
checkModuleModeCommon();
checkModuleModeApi(false);
checkModuleModeAll(true);
checkModuleFrameFiles(true);
checkAllModulesLink(true);
}
/**
* Test module summary pages in "all" mode.
*/
@Test
public void testAllModeHtml4() {
javadoc("-d", "out-all-html4",
"-html4",
"-use",
"--show-module-contents=all",
"-author",
"-version",
"-Xdoclint:none",
"--frames",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB,moduleC,moduletags",
"testpkgmdlA", "moduleA/concealedpkgmdlA", "testpkgmdlB", "testpkg2mdlB", "testpkgmdlC", "testpkgmdltags");
checkExit(Exit.OK);
checkModuleModeCommon_html4();
checkModuleModeApi_html4(false);
}
/**
* Test generated module summary page of a module with no exported package.
*/
@Test
public void testModuleSummaryNoExportedPkgAll() {
javadoc("-d", "out-ModuleSummaryNoExportedPkgAll",
"-use",
"--show-module-contents=all",
"-sourcepath", testSrc + "/moduleNoExport",
"--module", "moduleNoExport",
"testpkgmdlNoExport");
checkExit(Exit.OK);
checkModuleSummaryNoExported(true);
}
/**
* Test generated module summary page of a module with no exported package.
*/
@Test
public void testModuleSummaryNoExportedPkgAll_html4() {
javadoc("-d", "out-ModuleSummaryNoExportedPkgAll-html4",
"-html4",
"-use",
"--show-module-contents=all",
"-sourcepath", testSrc + "/moduleNoExport",
"--module", "moduleNoExport",
"testpkgmdlNoExport");
checkExit(Exit.OK);
checkModuleSummaryNoExported_html4(true);
}
/**
* Test generated module summary page of a module with no exported package.
*/
@Test
public void testModuleSummaryNoExportedPkgApi() {
javadoc("-d", "out-ModuleSummaryNoExportedPkgApi",
"-use",
"-sourcepath", testSrc + "/moduleNoExport",
"--module", "moduleNoExport",
"testpkgmdlNoExport");
checkExit(Exit.OK);
checkModuleSummaryNoExported(false);
}
/**
* Test generated module summary page of a module with no exported package.
*/
@Test
public void testModuleSummaryNoExportedPkgApi_html4() {
javadoc("-d", "out-ModuleSummaryNoExportedPkgApi-html4",
"-html4",
"-use",
"-sourcepath", testSrc + "/moduleNoExport",
"--module", "moduleNoExport",
"testpkgmdlNoExport");
checkExit(Exit.OK);
checkModuleSummaryNoExported_html4(false);
}
/**
* Test generated module pages for javadoc run for a single module having a single package.
*/
@Test
public void testSingleModuleSinglePkg() {
javadoc("-d", "out-singlemod",
"--frames",
"--module-source-path", testSrc,
"--module", "moduleC",
"testpkgmdlC");
checkExit(Exit.OK);
checkModuleFrameFiles(false);
}
/**
* Test generated module pages for javadoc run for a single module having multiple packages.
*/
@Test
public void testSingleModuleMultiplePkg() {
javadoc("-d", "out-singlemodmultiplepkg",
"--show-module-contents=all",
"-Xdoclint:none",
"--frames",
"--module-source-path", testSrc,
"--module", "moduleB",
"testpkg2mdlB", "testpkgmdlB");
checkExit(Exit.OK);
checkAllModulesLink(false);
}
/**
* Test -group option for modules. The overview-summary.html page should group the modules accordingly.
*/
@Test
public void testGroupOption() {
javadoc("-d", "out-group",
"--show-module-contents=all",
"-Xdoclint:none",
"--frames",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"-group", "Module Group A", "moduleA*",
"-group", "Module Group B & C", "moduleB*:moduleC*",
"-group", "Java SE Modules", "java*",
"--module", "moduleA,moduleB,moduleC,moduletags",
"moduleA/concealedpkgmdlA", "testpkgmdlA", "testpkg2mdlB", "testpkgmdlB", "testpkgmdlC",
"testpkgmdltags");
checkExit(Exit.OK);
checkGroupOption();
}
/**
* Test -group option for modules. The overview-summary.html page should group the modules accordingly.
*/
@Test
public void testGroupOption_html4() {
javadoc("-d", "out-group-html4",
"-html4",
"--show-module-contents=all",
"-Xdoclint:none",
"--frames",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"-group", "Module Group A", "moduleA*",
"-group", "Module Group B & C", "moduleB*:moduleC*",
"-group", "Java SE Modules", "java*",
"--module", "moduleA,moduleB,moduleC,moduletags",
"moduleA/concealedpkgmdlA", "testpkgmdlA", "testpkg2mdlB", "testpkgmdlB", "testpkgmdlC",
"testpkgmdltags");
checkExit(Exit.OK);
checkGroupOption_html4();
}
/**
* Test -group option for modules and the ordering of module groups.
* The overview-summary.html page should group the modules accordingly and display the group tabs in
* the order it was provided on the command-line.
*/
@Test
public void testGroupOptionOrdering() {
javadoc("-d", "out-groupOrder",
"--show-module-contents=all",
"-Xdoclint:none",
"--frames",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"-group", "B Group", "moduleB*",
"-group", "C Group", "moduleC*",
"-group", "A Group", "moduleA*",
"-group", "Java SE Modules", "java*",
"--module", "moduleA,moduleB,moduleC,moduletags",
"moduleA/concealedpkgmdlA", "testpkgmdlA", "testpkg2mdlB", "testpkgmdlB", "testpkgmdlC",
"testpkgmdltags");
checkExit(Exit.OK);
checkGroupOptionOrdering();
}
/**
* Test -group option for unnamed modules. The overview-summary.html page should group the packages accordingly.
*/
@Test
public void testUnnamedModuleGroupOption() {
javadoc("-d", "out-groupnomodule",
"-use",
"-Xdoclint:none",
"--frames",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"-group", "Package Group 0", "testpkgnomodule",
"-group", "Package Group 1", "testpkgnomodule1",
"testpkgnomodule", "testpkgnomodule1");
checkExit(Exit.OK);
checkUnnamedModuleGroupOption();
}
/**
* Test -group option for unnamed modules. The overview-summary.html page should group the packages accordingly.
*/
@Test
public void testUnnamedModuleGroupOption_html4() {
javadoc("-d", "out-groupnomodule-html4",
"-html4",
"-use",
"-Xdoclint:none",
"--frames",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"-group", "Package Group 0", "testpkgnomodule",
"-group", "Package Group 1", "testpkgnomodule1",
"testpkgnomodule", "testpkgnomodule1");
checkExit(Exit.OK);
checkUnnamedModuleGroupOption_html4();
}
/**
* Test -group option for unnamed modules and the ordering of package groups.
* The overview-summary.html page should group the packages accordingly and display the group tabs in
* the order it was provided on the command-line.
*/
@Test
public void testGroupOptionPackageOrdering() {
javadoc("-d", "out-groupPkgOrder",
"-use",
"-Xdoclint:none",
"--frames",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"-group", "Z Group", "testpkgnomodule",
"-group", "A Group", "testpkgnomodule1",
"testpkgnomodule", "testpkgnomodule1");
checkExit(Exit.OK);
checkGroupOptionPackageOrdering();
}
/**
* Test -group option for a single module.
*/
@Test
public void testGroupOptionSingleModule() {
javadoc("-d", "out-groupsinglemodule",
"-use",
"-Xdoclint:none",
"--frames",
"--module-source-path", testSrc,
"-group", "Module Group B", "moduleB*",
"--module", "moduleB",
"testpkg2mdlB", "testpkgmdlB");
checkExit(Exit.OK);
checkGroupOptionSingleModule();
}
/**
* Test -group option for a single module.
*/
@Test
public void testGroupOptionSingleModule_html4() {
javadoc("-d", "out-groupsinglemodule-html4",
"-html4",
"-use",
"-Xdoclint:none",
"--frames",
"--module-source-path", testSrc,
"-group", "Module Group B", "moduleB*",
"--module", "moduleB",
"testpkg2mdlB", "testpkgmdlB");
checkExit(Exit.OK);
checkGroupOptionSingleModule_html4();
}
/**
* Test -group option for a single module.
*/
@Test
public void testModuleName() {
javadoc("-d", "out-modulename",
"-use",
"-Xdoclint:none",
"--frames",
"--module-source-path", testSrc,
"--module", "moduleB,test.moduleFullName",
"testpkg2mdlB", "testpkgmdlB", "testpkgmdlfullname");
checkExit(Exit.OK);
checkModuleName(true);
}
/**
* Test -linkoffline option.
*/
@Test
public void testLinkOffline() {
String url = "https://docs.oracle.com/javase/9/docs/api/";
javadoc("-d", "out-linkoffline",
"-use",
"--show-module-contents=all",
"-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"-linkoffline", url, testSrc + "/jdk",
"testpkgmdlA", "testpkgmdlB", "testpkg3mdlB");
checkExit(Exit.OK);
checkLinkOffline();
}
void checkDescription(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"\n"
+ "\n"
+ "\n"
+ "\n"
+ "
This is a test description for the moduleA module with a Search "
+ "phrase
search phrase.
");
checkOutput("moduleB/module-summary.html", found,
"\n"
+ "\n"
+ "\n"
+ "\n"
+ "This is a test description for the moduleB module. Search "
+ "word
search_word with no description.
");
checkOutput("overview-summary.html", found,
"\n"
+ "\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "\n"
+ "
\n"
+ "
\n"
+ "Modules ");
checkOutput("overview-summary.html", false,
"
\n"
+ "
\n"
+ "
\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "
\n"
+ "
\n"
+ "
\n"
+ "Modules ");
}
void checkNoDescription(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"\n"
+ "
\n"
+ "- \n"
+ "
\n"
+ "- \n"
+ "");
checkOutput("moduleB/module-summary.html", found,
"
\n"
+ "
\n"
+ "- \n"
+ "
\n"
+ "- \n"
+ "");
}
void checkHtml5Description(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"\n"
+ "
Deprecated, for removal:"
+ " This API element is subject to removal in a future version.\n"
+ "\n"
+ "
\n"
+ "\n"
+ "\n"
+ "\n"
+ "\n"
+ "This is a test description for the moduleA module with a Search "
+ "phrase
search phrase.
");
checkOutput("moduleB/module-summary.html", found,
"\n"
+ "\n"
+ "\n"
+ "\n"
+ "\n"
+ "This is a test description for the moduleB module. Search "
+ "word
search_word with no description.
");
checkOutput("overview-summary.html", found,
"\n"
+ "\n"
+ "\n"
+ "\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "\n"
+ "
\n
\n"
+ "Modules ");
checkOutput("overview-summary.html", false,
"
\n"
+ "
\n"
+ "\n"
+ "
\n"
+ "\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "\n"
+ "
\n
\n"
+ "Modules ");
}
void checkHtml5NoDescription(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"\n"
+ "
\n"
+ "- \n"
+ "
\n"
+ "- \n"
+ "");
checkOutput("moduleB/module-summary.html", found,
"
\n"
+ "
\n"
+ "- \n"
+ "
\n"
+ "- \n"
+ "");
}
void checkModuleLink() {
checkOutput("overview-summary.html", true,
"
- Module
");
checkOutput("moduleA/module-summary.html", true,
"- Module
");
checkOutput("moduleB/module-summary.html", true,
"- Module
");
checkOutput("moduleA/testpkgmdlA/class-use/TestClassInModuleA.html", true,
"- Module
");
checkOutput("moduleB/testpkgmdlB/package-summary.html", true,
"- Module
");
checkOutput("moduleB/testpkgmdlB/TestClassInModuleB.html", true,
"- Module
");
checkOutput("moduleB/testpkgmdlB/class-use/TestClassInModuleB.html", true,
"- Module
");
}
void checkNoModuleLink() {
checkOutput("testpkgnomodule/package-summary.html", true,
"\n"
+ "- Package
");
checkOutput("testpkgnomodule/TestClassNoModule.html", true,
"\n"
+ "- Package
");
checkOutput("testpkgnomodule/class-use/TestClassNoModule.html", true,
"\n"
+ "- Package
");
}
void checkModuleTags() {
checkOutput("moduletags/module-summary.html", true,
"Type Link: TestClassInModuleTags
.",
"Member Link: testMethod(String)
.",
"Package Link: testpkgmdltags
.",
"- Since:
\n"
+ "- JDK 9
",
"- See Also:
\n"
+ "- \"Test see tag\", \n"
+ "
"
+ "TestClassInModuleTags
",
"- Regular Tag:
\n"
+ "- Just a regular simple tag.
",
"- Module Tag:
\n"
+ "- Just a simple module tag.
",
"- Version:
\n"
+ "- 1.0
",
"- Author:
\n"
+ "- Bhavesh Patel
");
checkOutput("moduletags/testpkgmdltags/TestClassInModuleTags.html", false,
"- Module Tag:
\n"
+ "- Just a simple module tag.
");
}
void checkModuleTags_html4() {
checkOutput("moduletags/module-summary.html", true,
"Member Link: testMethod(String)
.");
}
void checkOverviewSummaryModules() {
checkOutput("overview-summary.html", true,
"\n"
+ "
\n"
+ "Modules \n"
+ "\n"
+ "Module | \n"
+ "Description | \n"
+ "
");
checkOutput("overview-summary.html", false,
"\n"
+ "
\n"
+ "Packages \n"
+ "\n"
+ "Package | \n"
+ "Description | \n"
+ "
");
}
void checkOverviewSummaryPackages() {
checkOutput("overview-summary.html", false,
"\n"
+ "
\n"
+ "Modules \n"
+ "\n"
+ "Module | \n"
+ "Description | \n"
+ "
",
"
\n"
+ "
\n"
+ "\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "\n"
+ "
\n"
+ "
\n"
+ "Packages ");
checkOutput("overview-summary.html", true,
"\n"
+ "
\n"
+ "Packages \n"
+ "\n"
+ "Package | \n"
+ "Description | \n"
+ "
",
"\n"
+ "\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "\n"
+ "
\n"
+ "
\n"
+ "Packages ");
}
void checkHtml5OverviewSummaryModules() {
checkOutput("overview-summary.html", true,
"\n"
+ "
\n"
+ "Modules \n"
+ "\n"
+ "Module | \n"
+ "Description | \n"
+ "
");
checkOutput("overview-summary.html", false,
"\n"
+ "
\n"
+ "Packages \n"
+ "\n"
+ "Package | \n"
+ "Description | \n"
+ "
");
}
void checkHtml5OverviewSummaryPackages() {
checkOutput("overview-summary.html", false,
"\n"
+ "
\n"
+ "Modules \n"
+ "\n"
+ "Module | \n"
+ "Description | \n"
+ "
",
"
\n"
+ "
\n"
+ "\n"
+ "\n"
+ "\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "\n"
+ "\n"
+ "\n"
+ "
\n"
+ "
\n"
+ "Packages ");
checkOutput("overview-summary.html", true,
"\n
\n"
+ "Packages \n"
+ "\n"
+ "Package | \n"
+ "Description | \n"
+ "
",
"\n"
+ "\n"
+ "\n"
+ "\n"
+ "\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "\n"
+ "
\n
\n"
+ "Packages ");
}
void checkModuleSummary() {
checkOutput("moduleA/module-summary.html", true,
"",
"\n"
+ "\n"
+ "\n"
+ "",
"\n"
+ "testpkgmdlA | \n"
+ " | \n"
+ "
",
"\n"
+ "\n"
+ "\n"
+ "",
"\n"
+ "transitive | \n"
+ "moduleB | \n"
+ "\n"
+ " This is a test description for the moduleB module. \n"
+ " | \n"
+ "
");
checkOutput("moduleB/module-summary.html", true,
"- Description |
\n"
+ "- Modules |
\n"
+ "- Packages |
\n"
+ "- Services
",
"\n"
+ "\n"
+ "\n"
+ "",
"\n"
+ "testpkgmdlB | \n"
+ " | \n"
+ "
",
"\n"
+ "\n"
+ "\n"
+ "",
"\n"
+ "\n"
+ "\n"
+ "",
"\n"
+ "TestClassInModuleB | \n"
+ "\n"
+ " With a test description for uses. \n | \n"
+ "
",
"Opens \n"
+ "\n"
+ "Package | \n"
+ "Description | \n"
+ "
",
"Uses \n"
+ "\n"
+ "Type | \n"
+ "Description | \n"
+ "
",
"Provides \n"
+ "\n"
+ "Type | \n"
+ "Description | \n"
+ "
");
}
void checkModuleSummary_html4() {
checkOutput("moduleA/module-summary.html", true,
"\n"
+ "\n"
+ "\n"
+ "",
"\n"
+ "\n"
+ "\n"
+ "");
checkOutput("moduleB/module-summary.html", true,
"\n"
+ "\n"
+ "\n"
+ "",
"\n"
+ "\n"
+ "\n"
+ "",
"\n"
+ "\n"
+ "\n"
+ "");
}
void checkAggregatorModuleSummary() {
checkOutput("moduleT/module-summary.html", true,
"",
"This is a test description for the moduleT module. "
+ "Search phrase
search phrase. "
+ "Make sure there are no exported packages.
",
"\n"
+ "\n"
+ "transitive | \n"
+ "moduleA | \n"
+ "\n"
+ " This is a test description for the moduleA module with a Search "
+ "phrase search phrase. \n"
+ " | \n"
+ "
\n"
+ "\n"
+ "transitive | \n"
+ "moduleB | \n"
+ "\n"
+ " This is a test description for the moduleB module. \n"
+ " | \n"
+ "
\n"
+ "");
}
void checkNegatedModuleSummary() {
checkOutput("moduleA/module-summary.html", false,
"\n"
+ "\n"
+ "\n"
+ "");
}
void checkNegatedModuleSummary_html4() {
checkOutput("moduleA/module-summary.html", false,
"\n"
+ "\n"
+ "\n"
+ "");
}
void checkModuleClickThroughLinks() {
checkOutput("module-overview-frame.html", true,
"- moduleA
",
"- moduleB
");
checkOutput("script.js", true,
"function updateModuleFrame(pFrame, cFrame) {\n"
+ " top.packageFrame.location = pFrame;\n"
+ " top.classFrame.location = cFrame;\n"
+ "}");
}
void checkModuleClickThrough(boolean found) {
checkFiles(found,
"moduleA/module-type-frame.html",
"moduleB/module-type-frame.html");
}
void checkModuleFilesAndLinks(boolean found) {
checkFileAndOutput("moduleA/testpkgmdlA/package-summary.html", found,
"- Module
",
"");
checkFileAndOutput("moduleA/testpkgmdlA/TestClassInModuleA.html", found,
"- Module
",
"");
checkFileAndOutput("moduleB/testpkgmdlB/AnnotationType.html", found,
"",
"");
checkFiles(found,
"moduleA/module-frame.html",
"moduleA/module-summary.html",
"module-overview-frame.html");
}
void checkModuleFrameFiles(boolean found) {
checkFiles(found,
"moduleC/module-frame.html",
"moduleC/module-type-frame.html",
"module-overview-frame.html");
checkFiles(true,
"moduleC/module-summary.html",
"allclasses-frame.html");
checkFiles(false,
"allclasses-noframe.html");
}
void checkAllModulesLink(boolean found) {
checkOutput("overview-frame.html", found,
"- All Modules
");
}
void checkModulesInSearch(boolean found) {
checkOutput("index-all.html", found,
"\n"
+ "- moduleA - module moduleA
\n"
+ "- \n"
+ "
This is a test description for the moduleA module with a Search "
+ "phrase search phrase.
\n"
+ " \n"
+ "- moduleB - module moduleB
\n"
+ "- \n"
+ "
This is a test description for the moduleB module.
\n"
+ " \n"
+ "
",
"\n"
+ "- "
+ "search_word - Search tag in moduleB
\n"
+ "-
\n"
+ "- "
+ "search phrase - Search tag in moduleA
\n"
+ "- with description
\n"
+ "
");
checkOutput("index-all.html", false,
"- "
+ "search phrase - Search tag in moduleA
\n"
+ "- with description
\n"
+ "- "
+ "search phrase - Search tag in moduleA
\n"
+ "- with description
");
}
void checkModuleModeCommon() {
checkOutput("overview-summary.html", true,
"moduleA | \n"
+ "\n"
+ " This is a test description for the moduleA module with a Search "
+ "phrase search phrase. \n"
+ " | ",
"moduleB | \n"
+ "\n"
+ " This is a test description for the moduleB module. \n"
+ " | ",
"moduletags | \n"
+ "\n"
+ "\n"
+ " | ");
checkOutput("moduleA/module-summary.html", true,
"- Description |
\n"
+ "- Modules |
\n"
+ "- Packages |
\n"
+ "- Services
",
"moduleB | \n"
+ "testpkgmdlB | \n");
checkOutput("moduleB/module-summary.html", true,
"TestClassInModuleB | \n"
+ "\n"
+ " With a test description for uses. \n | \n");
checkOutput("moduletags/module-summary.html", true,
"- Description |
\n"
+ "- Modules |
\n"
+ "- Packages |
\n"
+ "- Services
",
"\n
\n"
+ "Indirect Requires ",
"transitive | \n"
+ "moduleB | \n"
+ "\n"
+ " This is a test description for the moduleB module. \n"
+ " | ",
"\n
\n"
+ "Indirect Exports ",
"transitive static | \n"
+ "moduleA | \n"
+ "\n"
+ " This is a test description for the moduleA module with a Search "
+ "phrase search phrase. \n"
+ " | ",
"\n
\n"
+ "Requires \n"
+ "\n"
+ "Modifier | \n"
+ "Module | \n"
+ "Description | ",
"\n
\n"
+ "Indirect Requires \n"
+ "\n"
+ "Modifier | \n"
+ "Module | \n"
+ "Description | ",
"\n
\n"
+ "Indirect Opens \n"
+ "\n"
+ "From | \n"
+ "Packages | \n"
+ "
\n",
"moduleB | \n"
+ "testpkgmdlB | \n");
}
void checkModuleModeCommon_html4() {
checkOutput("overview-summary.html", true,
"moduletags | \n"
+ "\n"
+ "\n"
+ " | ");
checkOutput("moduletags/module-summary.html", true,
"\n"
+ "
\n"
+ "Indirect Requires ",
"\n"
+ "
\n"
+ "Indirect Exports ",
"\n"
+ "
\n"
+ "Requires \n"
+ "\n"
+ "Modifier | \n"
+ "Module | \n"
+ "Description | ",
"\n"
+ "
\n"
+ "Indirect Requires \n"
+ "\n"
+ "Modifier | \n"
+ "Module | \n"
+ "Description | ",
"\n"
+ "
\n"
+ "Indirect Opens \n"
+ "\n"
+ "From | \n"
+ "Packages | \n"
+ "
\n");
}
void checkModuleModeApi(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"testpkgmdlA | \n"
+ " | ");
checkOutput("moduleB/module-summary.html", found,
"- Description |
\n"
+ "- Modules |
\n"
+ "- Packages |
\n"
+ "- Services
",
"testpkgmdlB | \n"
+ " | ",
"\n
\n"
+ "Opens \n"
+ "\n"
+ "Package | \n"
+ "Description | \n"
+ "
\n"
+ "\n"
+ "\n"
+ "testpkgmdlB | \n"
+ " | \n"
+ "
\n"
+ "\n"
+ "
");
checkOutput("moduletags/module-summary.html", true,
"
testpkgmdltags | \n"
+ "
| ");
}
void checkModuleModeApi_html4(boolean found) {
checkOutput("moduleB/module-summary.html", found,
"
\n"
+ "
\n"
+ "Opens \n"
+ "\n"
+ "Package | \n"
+ "Description | \n"
+ "
\n"
+ "\n"
+ "\n"
+ "testpkgmdlB | \n"
+ " | \n"
+ "
\n"
+ "\n"
+ "
");
}
void checkModuleModeAll(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"
| \n"
+ "
java.base | \n"
+ "
| ",
"
| \n"
+ "
moduleC | \n"
+ "
\n"
+ " This is a test description for the moduleC module. \n"
+ " | ",
"
moduleC | \n"
+ "
testpkgmdlC | ",
"
testpkgmdlA | \n"
+ "
All Modules | \n"
+ "
| ",
"
",
"
concealedpkgmdlA | \n"
+ "
None | \n"
+ "
| ");
checkOutput("moduleB/module-summary.html", found,
"
- Description |
\n"
+ "
- Modules |
\n"
+ "
- Packages |
\n"
+ "
- Services
",
"
testpkgmdlB | \n"
+ "
None | \n"
+ "
All Modules | \n"
+ "
| ",
"
| \n"
+ "
java.base | \n"
+ "
| ",
"
TestClass2InModuleB | \n"
+ "
| ",
"
TestInterface2InModuleB | \n"
+ "
(Implementation(s): TestClass2InModuleB) | ",
"
TestInterfaceInModuleB | \n"
+ "
(Implementation(s): TestClassInModuleB) | ",
"
");
checkOutput("moduleC/module-summary.html", found,
"
Exports \n"
+ "
\n"
+ "Package | \n"
+ "Exported To Modules | \n"
+ "Description | \n"
+ "
");
checkOutput("moduletags/module-summary.html", true,
"
testpkgmdltags | \n"
+ "
| ");
}
void checkModuleDeprecation(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"
Deprecated, for removal:"
+ " This API element is subject to removal in a future version.\n"
+ "\n"
+ "
");
checkOutput("deprecated-list.html", found,
"
",
"
\n"
+ "moduleA | \n"
+ "\n"
+ "\n"
+ " | \n"
+ "
");
checkOutput("moduleB/module-summary.html", !found,
"
Deprecated.\n"
+ "\n");
checkOutput("moduletags/module-summary.html", found,
"
@Deprecated\n"
+ "
",
"
Deprecated.
");
}
void checkModuleAnnotation() {
checkOutput("moduleB/module-summary.html", true,
"
@AnnotationType(optional=\"Module Annotation\",\n"
+ " required=2016)\n"
+ "
");
checkOutput("moduleB/module-summary.html", false,
"@AnnotationTypeUndocumented");
}
void checkModuleAnnotation_html4() {
checkOutput("moduleB/module-summary.html", true,
"
@AnnotationType(optional=\"Module Annotation\",\n"
+ " required=2016)\n"
+ "
");
}
void checkOverviewFrame(boolean found) {
checkOutput("index.html", !found,
"
");
checkOutput("index.html", found,
"
");
}
void checkModuleSummaryNoExported(boolean found) {
checkOutput("moduleNoExport/module-summary.html", found,
"\n"
+ "
\n"
+ "\n"
+ "",
"
Concealed ");
}
void checkModuleSummaryNoExported_html4(boolean found) {
checkOutput("moduleNoExport/module-summary.html", found,
"\n"
+ "
\n"
+ "\n"
+ "");
}
void checkGroupOption() {
checkOutput("overview-summary.html", true,
"
\n"
+ "
\n"
+ "
"
+ "
\n"
+ "
\n"
+ "
",
"var data = {\"i0\":1,\"i1\":2,\"i2\":2,\"i3\":4};\n"
+ "var tabs = {65535:[\"t0\",\"All Modules\"],1:[\"t1\",\"Module Group A\"],2:[\"t2\",\"Module Group B & C\"],4:[\"t4\",\"Other Modules\"]};\n"
+ "var altColor = \"altColor\";\n"
+ "var rowColor = \"rowColor\";\n"
+ "var tableTab = \"tableTab\";\n"
+ "var activeTableTab = \"activeTableTab\";");
checkOutput("overview-summary.html", false,
"\n
\n"
+ "Modules ",
"Java SE Modules");
}
void checkGroupOption_html4() {
checkOutput("overview-summary.html", true,
"\n"
+ "
\n"
+ "
"
+ ""
+ "
\n"
+ "
\n"
+ "
\n\n"
+ "Modules ",
"Java SE Modules");
}
void checkGroupOptionOrdering() {
checkOutput("overview-summary.html", true,
""
+ "
",
"var tabs = {65535:[\"t0\",\"All Modules\"],1:[\"t1\",\"B Group\"],2:[\"t2\",\"C Group\"],"
+ "4:[\"t4\",\"A Group\"],8:[\"t8\",\"Other Modules\"]};");
checkOutput("overview-summary.html", false,
""
+ "
",
"Java SE Modules");
}
void checkUnnamedModuleGroupOption() {
checkOutput("overview-summary.html", true,
"\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "\n"
+ "
\n"
+ "
"
+ "
\n"
+ "
\n"
+ "
",
"var data = {\"i0\":1,\"i1\":2};\n"
+ "var tabs = {65535:[\"t0\",\"All Packages\"],1:[\"t1\",\"Package Group 0\"],2:[\"t2\",\"Package Group 1\"]};\n"
+ "var altColor = \"altColor\";\n"
+ "var rowColor = \"rowColor\";\n"
+ "var tableTab = \"tableTab\";\n"
+ "var activeTableTab = \"activeTableTab\";");
}
void checkUnnamedModuleGroupOption_html4() {
checkOutput("overview-summary.html", true,
"\n"
+ "
The overview summary page header.
\n"
+ "
\n"
+ "\n"
+ "
\n"
+ "
\n"
+ "
\n"
+ "
");
}
void checkGroupOptionPackageOrdering() {
checkOutput("overview-summary.html", true,
""
+ "
",
"var tabs = {65535:[\"t0\",\"All Packages\"],1:[\"t1\",\"Z Group\"],2:[\"t2\",\"A Group\"]};");
}
void checkGroupOptionSingleModule() {
checkOutput("index.html", true,
"window.location.replace('moduleB/module-summary.html')");
}
void checkGroupOptionSingleModule_html4() {
checkOutput("index.html", true,
"window.location.replace('moduleB/module-summary.html')");
}
void checkModuleName(boolean found) {
checkOutput("test.moduleFullName/module-summary.html", found,
"");
checkOutput("index-all.html", found,
"T
\n"
+ "\n"
+ "- test.moduleFullName - module test.moduleFullName
\n"
+ "- \n"
+ "
This is a test description for the test.moduleFullName.
\n"
+ " ");
checkOutput("module-overview-frame.html", found,
"Modules
\n"
+ "");
checkOutput("test.moduleFullName/module-summary.html", !found,
"");
checkOutput("index-all.html", !found,
"\n"
+ "- moduleFullName - module moduleFullName
\n"
+ "- \n"
+ "
This is a test description for the test.moduleFullName.
\n"
+ " \n"
+ "
");
}
void checkLinkOffline() {
checkOutput("moduleB/testpkg3mdlB/package-summary.html", true,
"Link to String Class
");
checkOutput("moduleB/testpkg3mdlB/package-summary.html", true,
"Link to java.lang package
");
checkOutput("moduleB/testpkg3mdlB/package-summary.html", true,
"Link to java.base module
");
}
void checkAllPkgsAllClasses(boolean found) {
checkOutput("allclasses-index.html", true,
""
+ "
\n",
"\n"
+ "Class | \n"
+ "Description | \n"
+ "
");
checkOutput("allpackages-index.html", true,
"Package Summary \n"
+ "\n"
+ "Package | \n"
+ "Description | \n"
+ "
\n");
checkOutput("allclasses-index.html", found,
"\n");
checkOutput("allpackages-index.html", found,
"\n
\n");
checkOutput("allclasses-index.html", !found,
"");
checkOutput("allpackages-index.html", !found,
"\n"
+ "
");
checkOutput("type-search-index.js", true,
"{\"l\":\"All Classes\",\"url\":\"allclasses-index.html\"}");
checkOutput("package-search-index.js", true,
"{\"l\":\"All Packages\",\"url\":\"allpackages-index.html\"}");
checkOutput("index-all.html", true,
"
All Classes "
+ "All Packages");
}
}