22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363 |
26 * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363 |
27 * 8168766 8168688 8162674 8160196 8175799 8174974 |
27 * 8168766 8168688 8162674 8160196 8175799 8174974 8176778 |
28 * @summary Test modules support in javadoc. |
28 * @summary Test modules support in javadoc. |
29 * @author bpatel |
29 * @author bpatel |
30 * @library ../lib |
30 * @library ../lib |
31 * @modules jdk.javadoc/jdk.javadoc.internal.tool |
31 * @modules jdk.javadoc/jdk.javadoc.internal.tool |
32 * @build JavadocTester |
32 * @build JavadocTester |
177 "--module", "moduleA,moduleB", |
177 "--module", "moduleA,moduleB", |
178 "testpkgmdlA", "testpkgmdlB", "moduleB/testpkg2mdlB"); |
178 "testpkgmdlA", "testpkgmdlB", "moduleB/testpkg2mdlB"); |
179 checkExit(Exit.OK); |
179 checkExit(Exit.OK); |
180 checkModuleSummary(); |
180 checkModuleSummary(); |
181 checkNegatedModuleSummary(); |
181 checkNegatedModuleSummary(); |
|
182 } |
|
183 |
|
184 /** |
|
185 * Test generated module summary page of an aggregating module. |
|
186 */ |
|
187 @Test |
|
188 void testAggregatorModuleSummary() { |
|
189 javadoc("-d", "out-aggregatorModuleSummary", "-use", |
|
190 "--module-source-path", testSrc, |
|
191 "--expand-requires", "transitive", |
|
192 "--module", "moduleT"); |
|
193 checkExit(Exit.OK); |
|
194 checkAggregatorModuleSummary(); |
182 } |
195 } |
183 |
196 |
184 /** |
197 /** |
185 * Test generated module pages and pages with link to modules. |
198 * Test generated module pages and pages with link to modules. |
186 */ |
199 */ |
595 "<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" |
608 "<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" |
596 + "<tr>\n" |
609 + "<tr>\n" |
597 + "<th class=\"colFirst\" scope=\"col\">Type</th>\n" |
610 + "<th class=\"colFirst\" scope=\"col\">Type</th>\n" |
598 + "<th class=\"colLast\" scope=\"col\">Description</th>\n" |
611 + "<th class=\"colLast\" scope=\"col\">Description</th>\n" |
599 + "</tr>"); |
612 + "</tr>"); |
|
613 } |
|
614 |
|
615 void checkAggregatorModuleSummary() { |
|
616 checkOutput("moduleT-summary.html", true, |
|
617 "<div class=\"header\">\n" |
|
618 + "<h1 title=\"Module\" class=\"title\">Module moduleT</h1>\n" |
|
619 + "</div>", |
|
620 "<div class=\"block\">This is a test description for the moduleT module. " |
|
621 + "Search phrase <a id=\"searchphrase\">search phrase</a>. " |
|
622 + "Make sure there are no exported packages.</div>", |
|
623 "<tbody>\n" |
|
624 + "<tr class=\"altColor\">\n" |
|
625 + "<td class=\"colFirst\">transitive</td>\n" |
|
626 + "<th class=\"colSecond\" scope=\"row\"><a href=\"moduleA-summary.html\">moduleA</a></th>\n" |
|
627 + "<td class=\"colLast\">\n" |
|
628 + "<div class=\"block\">This is a test description for the moduleA module.</div>\n" |
|
629 + "</td>\n" |
|
630 + "</tr>\n" |
|
631 + "<tr class=\"rowColor\">\n" |
|
632 + "<td class=\"colFirst\">transitive</td>\n" |
|
633 + "<th class=\"colSecond\" scope=\"row\"><a href=\"moduleB-summary.html\">moduleB</a></th>\n" |
|
634 + "<td class=\"colLast\">\n" |
|
635 + "<div class=\"block\">This is a test description for the moduleB module.</div>\n" |
|
636 + "</td>\n" |
|
637 + "</tr>\n" |
|
638 + "</tbody>"); |
600 } |
639 } |
601 |
640 |
602 void checkNegatedModuleSummary() { |
641 void checkNegatedModuleSummary() { |
603 checkOutput("moduleA-summary.html", false, |
642 checkOutput("moduleA-summary.html", false, |
604 "<!-- ============ SERVICES SUMMARY =========== -->\n" |
643 "<!-- ============ SERVICES SUMMARY =========== -->\n" |