TestModules.java revision 3618:64182008b2d0
174462Salfred/*
274462Salfred * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
31901Swollman * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
41901Swollman *
51901Swollman * This code is free software; you can redistribute it and/or modify it
61901Swollman * under the terms of the GNU General Public License version 2 only, as
71901Swollman * published by the Free Software Foundation.
81901Swollman *
91901Swollman * This code is distributed in the hope that it will be useful, but WITHOUT
1026221Swpaul * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
111901Swollman * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
121901Swollman * version 2 for more details (a copy is included in the LICENSE file that
131901Swollman * accompanied this code).
1426221Swpaul *
151901Swollman * You should have received a copy of the GNU General Public License version
161901Swollman * 2 along with this work; if not, write to the Free Software Foundation,
171901Swollman * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1826221Swpaul *
191901Swollman * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
201901Swollman * or visit www.oracle.com if you need additional information or have any
211901Swollman * questions.
2226221Swpaul */
231901Swollman
241901Swollman/*
251901Swollman * @test
2626221Swpaul * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995
271901Swollman * @summary Test modules support in javadoc.
281901Swollman * @author bpatel
291901Swollman * @library ../lib
301901Swollman * @modules jdk.javadoc/jdk.javadoc.internal.tool
3126221Swpaul * @build JavadocTester
3226221Swpaul * @run main TestModules
3326221Swpaul */
341901Swollmanpublic class TestModules extends JavadocTester {
35136581Sobrien
36136581Sobrien    public static void main(String... args) throws Exception {
3726221Swpaul        TestModules tester = new TestModules();
381901Swollman        tester.runTests();
3992990Sobrien    }
4092990Sobrien
411901Swollman    /**
421901Swollman     * Test generated module pages for HTML 4.
4326221Swpaul     */
441901Swollman    @Test
451901Swollman    void testHtml4() {
461901Swollman        javadoc("-d", "out", "-use",
4775094Siedowse                "--module-source-path", testSrc,
4874462Salfred                "--add-modules", "module1,module2",
4974462Salfred                "testpkgmdl1", "testpkgmdl2");
5074462Salfred        checkExit(Exit.OK);
5126221Swpaul        checkDescription(true);
5274462Salfred        checkNoDescription(false);
53156090Sdeischen        checkOverviewSummaryModules();
541901Swollman        checkModuleLink();
551901Swollman        checkModuleClickThroughLinks();
568870Srgrimes        checkModuleClickThrough(true);
578870Srgrimes        checkModuleFilesAndLinks(true);
581901Swollman        checkModulesInSearch(true);
591901Swollman    }
608870Srgrimes
618870Srgrimes    /**
628870Srgrimes     * Test generated module pages for HTML 5.
631901Swollman     */
641901Swollman    @Test
6574462Salfred    void testHtml5() {
6674462Salfred        javadoc("-d", "out-html5", "-html5", "-use",
671901Swollman                "--module-source-path", testSrc,
681901Swollman                "--add-modules", "module1,module2",
691901Swollman                "testpkgmdl1", "testpkgmdl2");
7026221Swpaul        checkExit(Exit.OK);
7126221Swpaul        checkHtml5Description(true);
7226221Swpaul        checkHtml5NoDescription(false);
7392905Sobrien        checkHtml5OverviewSummaryModules();
7426221Swpaul        checkModuleLink();
751901Swollman        checkModuleClickThroughLinks();
7626221Swpaul        checkModuleClickThrough(true);
771901Swollman        checkModuleFilesAndLinks(true);
781901Swollman        checkModulesInSearch(true);
791901Swollman    }
801901Swollman
811901Swollman    /**
821901Swollman     * Test generated module pages for HTML 4 with -nocomment option.
831901Swollman     */
841901Swollman    @Test
851901Swollman    void testHtml4NoComment() {
861901Swollman        javadoc("-d", "out-nocomment", "-nocomment", "-use",
871901Swollman                "--module-source-path", testSrc,
881901Swollman                "--add-modules", "module1,module2",
891901Swollman                "testpkgmdl1", "testpkgmdl2");
901901Swollman        checkExit(Exit.OK);
911901Swollman        checkDescription(false);
921901Swollman        checkNoDescription(true);
931901Swollman        checkModuleLink();
941901Swollman        checkModuleFilesAndLinks(true);
951901Swollman    }
961901Swollman
971901Swollman    /**
9874462Salfred     * Test generated module pages for HTML 5 with -nocomment option.
991901Swollman     */
1001901Swollman    @Test
10174462Salfred    void testHtml5NoComment() {
10274462Salfred        javadoc("-d", "out-html5-nocomment", "-nocomment", "-html5", "-use",
10374462Salfred                "--module-source-path", testSrc,
1041901Swollman                "--add-modules", "module1,module2",
10574462Salfred                "testpkgmdl1", "testpkgmdl2");
10674462Salfred        checkExit(Exit.OK);
1071901Swollman        checkHtml5Description(false);
1081901Swollman        checkHtml5NoDescription(true);
1091901Swollman        checkModuleLink();
1101901Swollman        checkModuleFilesAndLinks(true);
11126221Swpaul    }
11226221Swpaul
11374462Salfred    /**
11474462Salfred     * Test generated pages, in an unnamed module, for HTML 4.
11574462Salfred     */
11674462Salfred    @Test
11774462Salfred    void testHtml4UnnamedModule() {
11826221Swpaul        javadoc("-d", "out-nomodule", "-use",
11974462Salfred                "-sourcepath", testSrc,
12074462Salfred                "testpkgnomodule", "testpkgnomodule1");
12126221Swpaul        checkExit(Exit.OK);
12226221Swpaul        checkOverviewSummaryPackages();
12374462Salfred        checkModuleClickThrough(false);
12474462Salfred        checkModuleFilesAndLinks(false);
12526221Swpaul        checkModulesInSearch(false);
12674462Salfred    }
12774462Salfred
1281901Swollman    /**
1291901Swollman     * Test generated pages, in an unnamed module, for HTML 5.
13026221Swpaul     */
13174462Salfred    @Test
13226221Swpaul    void testHtml5UnnamedModule() {
13326221Swpaul        javadoc("-d", "out-html5-nomodule", "-html5", "-use",
13426221Swpaul                "-sourcepath", testSrc,
13526221Swpaul                "testpkgnomodule", "testpkgnomodule1");
13626221Swpaul        checkExit(Exit.OK);
13774462Salfred        checkHtml5OverviewSummaryPackages();
13826221Swpaul        checkModuleFilesAndLinks(false);
13926221Swpaul        checkModulesInSearch(false);
14026221Swpaul    }
14174462Salfred
14226221Swpaul    /**
1431901Swollman     * Test generated module pages with javadoc tags.
1441901Swollman     */
1451901Swollman    @Test
14626221Swpaul    void testJDTagsInModules() {
1471901Swollman        javadoc("-d", "out-mdltags", "-author", "-version",
14826221Swpaul                "-tag", "regular:a:Regular Tag:",
14926221Swpaul                "-tag", "moduletag:s:Module Tag:",
15026221Swpaul                "--module-source-path", testSrc,
1511901Swollman                "--add-modules", "moduletags,module2",
1521901Swollman                "testpkgmdltags", "testpkgmdl2");
1531901Swollman        checkExit(Exit.OK);
15426221Swpaul        checkModuleTags();
15526221Swpaul    }
15626221Swpaul
15726221Swpaul    /**
15826221Swpaul     * Test generated module summary page.
15926221Swpaul     */
16026221Swpaul    @Test
16126221Swpaul    void testModuleSummary() {
16226221Swpaul        javadoc("-d", "out-moduleSummary", "-use",
16326221Swpaul                "--module-source-path", testSrc,
16426221Swpaul                "--add-modules", "module1,module2",
16526221Swpaul                "testpkgmdl1", "testpkgmdl2", "module2/testpkg2mdl2");
16626221Swpaul        checkExit(Exit.OK);
16726221Swpaul        checkModuleSummary();
16826221Swpaul        checkNegatedModuleSummary();
16926221Swpaul    }
17026221Swpaul
17174462Salfred    /**
17292905Sobrien     * Test generated module pages and pages with link to modules.
17326221Swpaul     */
17474462Salfred    @Test
17526221Swpaul    void testModuleFilesAndLinks() {
17626221Swpaul        javadoc("-d", "out-modulelinks",
17726221Swpaul                "--module-source-path", testSrc,
17874462Salfred                "--add-modules", "module1",
17926221Swpaul                "testpkgmdl1");
18026221Swpaul        checkExit(Exit.OK);
18126221Swpaul        checkModuleFilesAndLinks(true);
18226221Swpaul    }
18326221Swpaul
18426221Swpaul    void checkDescription(boolean found) {
18526221Swpaul        checkOutput("module1-summary.html", found,
18626221Swpaul                "<!-- ============ MODULE DESCRIPTION =========== -->\n"
18774462Salfred                + "<a name=\"module.description\">\n"
18826221Swpaul                + "<!--   -->\n"
18926221Swpaul                + "</a>\n"
19026221Swpaul                + "<div class=\"block\">This is a test description for the module1 module. Search "
19174462Salfred                + "phrase <a id=\"searchphrase\">search phrase</a>.</div>");
19226221Swpaul        checkOutput("module2-summary.html", found,
19326221Swpaul                "<!-- ============ MODULE DESCRIPTION =========== -->\n"
19426221Swpaul                + "<a name=\"module.description\">\n"
19526221Swpaul                + "<!--   -->\n"
19626221Swpaul                + "</a>\n"
19774462Salfred                + "<div class=\"block\">This is a test description for the module2 module. Search "
19826221Swpaul                + "word <a id=\"search_word\">search_word</a> with no description.</div>");
19974462Salfred    }
20026221Swpaul
20126221Swpaul    void checkNoDescription(boolean found) {
20226221Swpaul        checkOutput("module1-summary.html", found,
20326221Swpaul                "<div class=\"contentContainer\">\n"
20426221Swpaul                + "<ul class=\"blockList\">\n"
20526221Swpaul                + "<li class=\"blockList\">\n"
20674462Salfred                + "<ul class=\"blockList\">\n"
20726221Swpaul                + "<li class=\"blockList\">\n"
20826221Swpaul                + "<!-- ============ MODULES SUMMARY =========== -->");
20926221Swpaul        checkOutput("module2-summary.html", found,
21026221Swpaul                "<div class=\"contentContainer\">\n"
211                + "<ul class=\"blockList\">\n"
212                + "<li class=\"blockList\">\n"
213                + "<ul class=\"blockList\">\n"
214                + "<li class=\"blockList\">\n"
215                + "<!-- ============ MODULES SUMMARY =========== -->");
216    }
217
218    void checkHtml5Description(boolean found) {
219        checkOutput("module1-summary.html", found,
220                "<section role=\"region\">\n"
221                + "<!-- ============ MODULE DESCRIPTION =========== -->\n"
222                + "<a id=\"module.description\">\n"
223                + "<!--   -->\n"
224                + "</a>\n"
225                + "<div class=\"block\">This is a test description for the module1 module. Search "
226                + "phrase <a id=\"searchphrase\">search phrase</a>.</div>");
227        checkOutput("module2-summary.html", found,
228                "<section role=\"region\">\n"
229                + "<!-- ============ MODULE DESCRIPTION =========== -->\n"
230                + "<a id=\"module.description\">\n"
231                + "<!--   -->\n"
232                + "</a>\n"
233                + "<div class=\"block\">This is a test description for the module2 module. Search "
234                + "word <a id=\"search_word\">search_word</a> with no description.</div>");
235    }
236
237    void checkHtml5NoDescription(boolean found) {
238        checkOutput("module1-summary.html", found,
239                "<div class=\"contentContainer\">\n"
240                + "<ul class=\"blockList\">\n"
241                + "<li class=\"blockList\">\n"
242                + "<ul class=\"blockList\">\n"
243                + "<li class=\"blockList\">\n"
244                + "<!-- ============ MODULES SUMMARY =========== -->");
245        checkOutput("module2-summary.html", found,
246                "<div class=\"contentContainer\">\n"
247                + "<ul class=\"blockList\">\n"
248                + "<li class=\"blockList\">\n"
249                + "<ul class=\"blockList\">\n"
250                + "<li class=\"blockList\">\n"
251                + "<!-- ============ MODULES SUMMARY =========== -->");
252    }
253
254    void checkModuleLink() {
255        checkOutput("overview-summary.html", true,
256                "<li>Module</li>");
257        checkOutput("module1-summary.html", true,
258                "<li class=\"navBarCell1Rev\">Module</li>");
259        checkOutput("module2-summary.html", true,
260                "<li class=\"navBarCell1Rev\">Module</li>");
261        checkOutput("testpkgmdl1/class-use/TestClassInModule1.html", true,
262                "<li><a href=\"../../module1-summary.html\">Module</a></li>");
263        checkOutput("testpkgmdl2/package-summary.html", true,
264                "<li><a href=\"../module2-summary.html\">Module</a></li>");
265        checkOutput("testpkgmdl2/TestClassInModule2.html", true,
266                "<li><a href=\"../module2-summary.html\">Module</a></li>");
267        checkOutput("testpkgmdl2/class-use/TestClassInModule2.html", true,
268                "<li><a href=\"../../module2-summary.html\">Module</a></li>");
269    }
270
271    void checkNoModuleLink() {
272        checkOutput("testpkgnomodule/package-summary.html", true,
273                "<ul class=\"navList\" title=\"Navigation\">\n"
274                + "<li><a href=\"../testpkgnomodule/package-summary.html\">Package</a></li>");
275        checkOutput("testpkgnomodule/TestClassNoModule.html", true,
276                "<ul class=\"navList\" title=\"Navigation\">\n"
277                + "<li><a href=\"../testpkgnomodule/package-summary.html\">Package</a></li>");
278        checkOutput("testpkgnomodule/class-use/TestClassNoModule.html", true,
279                "<ul class=\"navList\" title=\"Navigation\">\n"
280                + "<li><a href=\"../../testpkgnomodule/package-summary.html\">Package</a></li>");
281    }
282
283    void checkModuleTags() {
284        checkOutput("moduletags-summary.html", true,
285                "Type Link: <a href=\"testpkgmdltags/TestClassInModuleTags.html\" title=\"class in "
286                + "testpkgmdltags\"><code>TestClassInModuleTags</code></a>.");
287        checkOutput("moduletags-summary.html", true,
288                "Member Link: <a href=\"testpkgmdltags/TestClassInModuleTags.html#"
289                + "testMethod-java.lang.String-\"><code>testMethod(String)</code></a>.");
290        checkOutput("moduletags-summary.html", true,
291                "Package Link: <a href=\"testpkgmdltags/package-summary.html\"><code>testpkgmdltags</code></a>.");
292        checkOutput("moduletags-summary.html", true,
293                "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
294                + "<dd>JDK 9</dd>");
295        checkOutput("moduletags-summary.html", true,
296                "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
297                + "<dd>\"Test see tag\", \n"
298                + "<a href=\"testpkgmdltags/TestClassInModuleTags.html\" title=\"class in testpkgmdltags\"><code>"
299                + "TestClassInModuleTags</code></a></dd>");
300        checkOutput("moduletags-summary.html", true,
301                "<dt><span class=\"simpleTagLabel\">Regular Tag:</span></dt>\n"
302                + "<dd>Just a regular simple tag.</dd>");
303        checkOutput("moduletags-summary.html", true,
304                "<dt><span class=\"simpleTagLabel\">Module Tag:</span></dt>\n"
305                + "<dd>Just a simple module tag.</dd>");
306        checkOutput("moduletags-summary.html", true,
307                "<dt><span class=\"simpleTagLabel\">Version:</span></dt>\n"
308                + "<dd>1.0</dd>");
309        checkOutput("moduletags-summary.html", true,
310                "<dt><span class=\"simpleTagLabel\">Author:</span></dt>\n"
311                + "<dd>Bhavesh Patel</dd>");
312        checkOutput("testpkgmdltags/TestClassInModuleTags.html", false,
313                "<dt><span class=\"simpleTagLabel\">Module Tag:</span></dt>\n"
314                + "<dd>Just a simple module tag.</dd>");
315    }
316
317    void checkOverviewSummaryModules() {
318        checkOutput("overview-summary.html", true,
319                "<table class=\"overviewSummary\" summary=\"Module Summary table, listing modules, and an explanation\">\n"
320                + "<caption><span>Modules</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
321                + "<tr>\n"
322                + "<th class=\"colFirst\" scope=\"col\">Module</th>\n"
323                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
324                + "</tr>");
325        checkOutput("overview-summary.html", false,
326                "<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
327                + "<caption><span>Packages</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
328                + "<tr>\n"
329                + "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
330                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
331                + "</tr>");
332    }
333
334    void checkOverviewSummaryPackages() {
335        checkOutput("overview-summary.html", false,
336                "<table class=\"overviewSummary\" summary=\"Module Summary table, listing modules, and an explanation\">\n"
337                + "<caption><span>Modules</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
338                + "<tr>\n"
339                + "<th class=\"colFirst\" scope=\"col\">Module</th>\n"
340                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
341                + "</tr>");
342        checkOutput("overview-summary.html", true,
343                "<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
344                + "<caption><span>Packages</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
345                + "<tr>\n"
346                + "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
347                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
348                + "</tr>");
349    }
350
351    void checkHtml5OverviewSummaryModules() {
352        checkOutput("overview-summary.html", true,
353                "<table class=\"overviewSummary\">\n"
354                + "<caption><span>Modules</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
355                + "<tr>\n"
356                + "<th class=\"colFirst\" scope=\"col\">Module</th>\n"
357                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
358                + "</tr>");
359        checkOutput("overview-summary.html", false,
360                "<table class=\"overviewSummary\">\n"
361                + "<caption><span>Packages</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
362                + "<tr>\n"
363                + "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
364                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
365                + "</tr>");
366    }
367
368    void checkHtml5OverviewSummaryPackages() {
369        checkOutput("overview-summary.html", false,
370                "<table class=\"overviewSummary\">\n"
371                + "<caption><span>Modules</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
372                + "<tr>\n"
373                + "<th class=\"colFirst\" scope=\"col\">Module</th>\n"
374                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
375                + "</tr>");
376        checkOutput("overview-summary.html", true,
377                "<table class=\"overviewSummary\">\n"
378                + "<caption><span>Packages</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
379                + "<tr>\n"
380                + "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
381                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
382                + "</tr>");
383    }
384
385    void checkModuleSummary() {
386        checkOutput("module1-summary.html", true,
387                "<ul class=\"subNavList\">\n"
388                + "<li>Module:&nbsp;</li>\n"
389                + "<li><a href=\"#module.description\">Description</a>&nbsp;|&nbsp;<a "
390                + "href=\"#modules.summary\">Modules</a>&nbsp;|&nbsp;<a href=\"#packages.summary\">"
391                + "Packages</a>&nbsp;|&nbsp;Services</li>\n"
392                + "</ul>");
393        checkOutput("module1-summary.html", true,
394                "<!-- ============ MODULES SUMMARY =========== -->\n"
395                + "<a name=\"modules.summary\">\n"
396                + "<!--   -->\n"
397                + "</a>");
398        checkOutput("module1-summary.html", true,
399                "<tr class=\"altColor\">\n"
400                + "<td class=\"colFirst\"><a href=\"testpkgmdl1/package-summary.html\">testpkgmdl1</a></td>\n"
401                + "<td class=\"colSecond\">All Modules</td>\n"
402                + "<td class=\"colLast\">&nbsp;</td>\n"
403                + "</tr>");
404        checkOutput("module1-summary.html", true,
405                "<!-- ============ PACKAGES SUMMARY =========== -->\n"
406                + "<a name=\"packages.summary\">\n"
407                + "<!--   -->\n"
408                + "</a>");
409        checkOutput("module1-summary.html", true,
410                "<tr class=\"rowColor\">\n"
411                + "<td class=\"colFirst\"><a href=\"module2-summary.html\">module2</a></td>\n"
412                + "<td class=\"colLast\">\n"
413                + "<div class=\"block\">This is a test description for the module2 module.</div>\n"
414                + "</td>\n"
415                + "</tr>");
416        checkOutput("module2-summary.html", true,
417                "<li><a href=\"#module.description\">Description</a>&nbsp;|&nbsp;<a "
418                + "href=\"#modules.summary\">Modules</a>&nbsp;|&nbsp;<a href=\"#packages.summary\">"
419                + "Packages</a>&nbsp;|&nbsp;<a href=\"#services.summary\">Services</a></li>");
420        checkOutput("module2-summary.html", true,
421                "<!-- ============ MODULES SUMMARY =========== -->\n"
422                + "<a name=\"modules.summary\">\n"
423                + "<!--   -->\n"
424                + "</a>");
425        checkOutput("module2-summary.html", true,
426                "<tr class=\"rowColor\">\n"
427                + "<td class=\"colFirst\"><a href=\"testpkg2mdl2/package-summary.html\">"
428                + "testpkg2mdl2</a></td>\n"
429                + "<td class=\"colSecond\">module1</td>\n"
430                + "<td class=\"colLast\">&nbsp;</td>\n"
431                + "</tr>");
432        checkOutput("module2-summary.html", true,
433                "<!-- ============ PACKAGES SUMMARY =========== -->\n"
434                + "<a name=\"packages.summary\">\n"
435                + "<!--   -->\n"
436                + "</a>");
437        checkOutput("module2-summary.html", true,
438                "<tr class=\"altColor\">\n"
439                + "<td class=\"colFirst\"><a href=\"java.base-summary.html\">java.base</a></td>\n"
440                + "<td class=\"colLast\">&nbsp;</td>\n"
441                + "</tr>");
442        checkOutput("module2-summary.html", true,
443                "<!-- ============ SERVICES SUMMARY =========== -->\n"
444                + "<a name=\"services.summary\">\n"
445                + "<!--   -->\n"
446                + "</a>");
447        checkOutput("module2-summary.html", true,
448                "<tr class=\"altColor\">\n"
449                + "<td class=\"colFirst\"><a href=\"testpkgmdl2/TestClassInModule2.html\" "
450                + "title=\"class in testpkgmdl2\">TestClassInModule2</a></td>\n"
451                + "<td class=\"colLast\">&nbsp;</td>\n"
452                + "</tr>");
453        checkOutput("module2-summary.html", true,
454                "<tr class=\"altColor\">\n"
455                + "<td class=\"colFirst\"><a href=\"testpkg2mdl2/TestInterfaceInModule2.html\" "
456                + "title=\"interface in testpkg2mdl2\">TestInterfaceInModule2</a><br>"
457                + "(<span class=\"implementationLabel\">Implementation:</span>&nbsp;"
458                + "<a href=\"testpkgmdl2/TestClassInModule2.html\" title=\"class in testpkgmdl2\">"
459                + "TestClassInModule2</a>)</td>\n"
460                + "<td class=\"colLast\">&nbsp;</td>\n"
461                + "</tr");
462        checkOutput("module2-summary.html", true,
463                "<caption><span>Exported Packages</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
464                + "<tr>\n"
465                + "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
466                + "<th scope=\"col\">Module</th>\n"
467                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
468                + "</tr>");
469        checkOutput("module2-summary.html", true,
470                "<caption><span>Requires</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
471                + "<tr>\n"
472                + "<th class=\"colFirst\" scope=\"col\">Module</th>\n"
473                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
474                + "</tr>");
475        checkOutput("module2-summary.html", true,
476                "<caption><span>Uses</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
477                + "<tr>\n"
478                + "<th class=\"colFirst\" scope=\"col\">Type</th>\n"
479                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
480                + "</tr>");
481        checkOutput("module2-summary.html", true,
482                "<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
483                + "<tr>\n"
484                + "<th class=\"colFirst\" scope=\"col\">Type</th>\n"
485                + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
486                + "</tr>");
487    }
488
489    void checkNegatedModuleSummary() {
490        checkOutput("module1-summary.html", false,
491                "<!-- ============ SERVICES SUMMARY =========== -->\n"
492                + "<a name=\"services.summary\">\n"
493                + "<!--   -->\n"
494                + "</a>");
495    }
496
497    void checkModuleClickThroughLinks() {
498        checkOutput("module-overview-frame.html", true,
499                "<li><a href=\"module1-frame.html\" target=\"packageListFrame\" "
500                + "onclick=\"updateModuleFrame('module1-type-frame.html','module1-summary.html');"
501                + "\">module1</a></li>");
502        checkOutput("module-overview-frame.html", true,
503                "<li><a href=\"module2-frame.html\" target=\"packageListFrame\" "
504                + "onclick=\"updateModuleFrame('module2-type-frame.html','module2-summary.html');"
505                + "\">module2</a></li>");
506        checkOutput("script.js", true,
507                "function updateModuleFrame(pFrame, cFrame)\n"
508                + "{\n"
509                + "    top.packageFrame.location = pFrame;\n"
510                + "    top.classFrame.location = cFrame;\n"
511                + "}");
512    }
513
514    void checkModuleClickThrough(boolean found) {
515        checkFiles(found,
516                "module1-type-frame.html",
517                "module2-type-frame.html");
518    }
519
520    void checkModuleFilesAndLinks(boolean found) {
521        checkOutput("testpkgmdl1/package-summary.html", found,
522                "<li><a href=\"../module1-summary.html\">Module</a></li>");
523        checkOutput("testpkgmdl1/package-summary.html", found,
524                "<div class=\"subTitle\"><span class=\"moduleLabelInClass\">Module</span>&nbsp;"
525                + "<a href=\"../module1-summary.html\">module1</a></div>");
526        checkOutput("testpkgmdl1/TestClassInModule1.html", found,
527                "<li><a href=\"../module1-summary.html\">Module</a></li>");
528        checkOutput("testpkgmdl1/TestClassInModule1.html", found,
529                "<div class=\"subTitle\"><span class=\"moduleLabelInClass\">Module</span>&nbsp;"
530                + "<a href=\"../module1-summary.html\">module1</a></div>");
531        checkFiles(found,
532                "module1-frame.html",
533                "module1-summary.html",
534                "module-overview-frame.html");
535    }
536
537    void checkModulesInSearch(boolean found) {
538        checkOutput("index-all.html", found,
539                "<dl>\n"
540                + "<dt><a href=\"module1-summary.html\">module1</a> - module module1</dt>\n"
541                + "<dd>\n"
542                + "<div class=\"block\">This is a test description for the module1 module.</div>\n"
543                + "</dd>\n"
544                + "<dt><a href=\"module2-summary.html\">module2</a> - module module2</dt>\n"
545                + "<dd>\n"
546                + "<div class=\"block\">This is a test description for the module2 module.</div>\n"
547                + "</dd>\n"
548                + "</dl>");
549        checkOutput("index-all.html", found,
550                "<dl>\n"
551                + "<dt><span class=\"searchTagLink\"><a href=\"module1-summary.html#searchphrase\">"
552                + "search phrase</a></span> - Search tag in module1</dt>\n"
553                + "<dd>with description</dd>\n"
554                + "<dt><span class=\"searchTagLink\"><a href=\"module2-summary.html#search_word\">"
555                + "search_word</a></span> - Search tag in module2</dt>\n"
556                + "<dd>&nbsp;</dd>\n"
557                + "</dl>");
558}
559}
560