author | bpatel |
Tue, 06 Mar 2018 10:45:47 -0800 | |
changeset 49139 | 771616d26ca1 |
parent 48759 | ffa68af7da87 |
child 52616 | 1a395165c09b |
permissions | -rw-r--r-- |
44684 | 1 |
/* |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
2 |
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
44684 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
26 |
* @bug 8178067 8192007 8182765 |
44684 | 27 |
* @summary tests the module's services, such as provides and uses |
28 |
* @modules jdk.javadoc/jdk.javadoc.internal.api |
|
29 |
* jdk.javadoc/jdk.javadoc.internal.tool |
|
30 |
* jdk.compiler/com.sun.tools.javac.api |
|
31 |
* jdk.compiler/com.sun.tools.javac.main |
|
32 |
* @library ../lib /tools/lib |
|
33 |
* @build toolbox.ToolBox toolbox.ModuleBuilder JavadocTester |
|
34 |
* @run main TestModuleServices |
|
35 |
*/ |
|
36 |
||
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
37 |
import java.nio.file.Files; |
44684 | 38 |
import java.nio.file.Path; |
39 |
import java.nio.file.Paths; |
|
40 |
||
41 |
import toolbox.*; |
|
42 |
||
43 |
public class TestModuleServices extends JavadocTester { |
|
44 |
||
45 |
public final ToolBox tb; |
|
46 |
public static void main(String... args) throws Exception { |
|
47 |
TestModuleServices tester = new TestModuleServices(); |
|
48 |
tester.runTests(m -> new Object[] { Paths.get(m.getName()) }); |
|
49 |
} |
|
50 |
||
51 |
public TestModuleServices() { |
|
52 |
tb = new ToolBox(); |
|
53 |
} |
|
54 |
||
55 |
@Test |
|
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
56 |
public void checkModuleServicesDescription(Path base) throws Exception { |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
57 |
Path src = Files.createDirectories(base.resolve("src")); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
58 |
ModuleBuilder mb = new ModuleBuilder(tb, "moduleService") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
59 |
.comment("This module exports a package containing the declaration of a service type.") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
60 |
.exports("pkgService") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
61 |
.classes("/**A Package that has a service.*/ package pkgService;") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
62 |
.classes("package pkgService; /**A service Interface for service providers.*/ " |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
63 |
+ "public interface Service {\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
64 |
+ " /**\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
65 |
+ " * A test method for the service.\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
66 |
+ " */\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
67 |
+ " void testMethod1();\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
68 |
+ " /**\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
69 |
+ " * Another test method for the service.\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
70 |
+ " */\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
71 |
+ " void testMethod2();\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
72 |
+ "}"); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
73 |
mb.write(src); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
74 |
mb = new ModuleBuilder(tb, "moduleServiceProvider") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
75 |
.comment("This module provides an implementation of a service.\n" + |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
76 |
"@provides pkgService.Service Provides a service whose name is ServiceProvider.") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
77 |
.requires("moduleService") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
78 |
.provides("pkgService.Service", "pkgServiceProvider.ServiceProvider") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
79 |
.classes("/**A Package that has a service provider.*/ package pkgServiceProvider;") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
80 |
.classes("package pkgServiceProvider;\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
81 |
+ "public class ServiceProvider implements pkgService.Service {\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
82 |
+ " /**\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
83 |
+ " * {@inheritDoc}\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
84 |
+ " */\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
85 |
+ " public void testMethod1() {}\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
86 |
+ " /**\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
87 |
+ " * This is an internal implementation so the documentation will not be seen.\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
88 |
+ " */\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
89 |
+ " public void testMethod2() {}\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
90 |
+ "}"); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
91 |
mb.write(src); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
92 |
mb = new ModuleBuilder(tb, "moduleServiceUser") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
93 |
.comment("This module uses a service defined in another module.\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
94 |
+ "@uses pkgService.Service If no other provider is found, a default internal implementation will be used.") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
95 |
.requires("moduleService") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
96 |
.uses("pkgService.Service") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
97 |
.classes("/**A Package that has a service user.*/ package pkgServiceUser;") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
98 |
.classes("package pkgServiceUser;\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
99 |
+ "/**\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
100 |
+ " * A service user class.\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
101 |
+ " */\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
102 |
+ "public class ServiceUser {\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
103 |
+ "}"); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
104 |
mb.write(src); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
105 |
mb = new ModuleBuilder(tb, "moduleServiceUserNoDescription") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
106 |
.comment("This is another module that uses a service defined in another module.\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
107 |
+ "@uses pkgService.Service") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
108 |
.requires("moduleService") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
109 |
.uses("pkgService.Service") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
110 |
.classes("/**A Package that has a service user with no description.*/ package pkgServiceUserNoDescription;") |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
111 |
.classes("package pkgServiceUserNoDescription;\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
112 |
+ "/**\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
113 |
+ " * A service user class.\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
114 |
+ " */\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
115 |
+ "public class ServiceUserNoDescription {\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
116 |
+ "}"); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
117 |
mb.write(src); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
118 |
|
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
119 |
javadoc("-d", base.resolve("out").toString(), |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
120 |
"-quiet", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
121 |
"-noindex", |
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
122 |
"--module-source-path", src.toString(), |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
123 |
"--module", "moduleService,moduleServiceProvider,moduleServiceUser,moduleServiceUserNoDescription", |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
124 |
"pkgService", "moduleServiceProvider/pkgServiceProvider", "moduleServiceUser/pkgServiceUser", |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
125 |
"moduleServiceUserNoDescription/pkgServiceUserNoDescription"); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
126 |
checkExit(Exit.OK); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
127 |
|
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
128 |
checkOutput("moduleServiceProvider/module-summary.html", true, |
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
129 |
"<tr class=\"altColor\">\n" |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
130 |
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"../moduleService/pkgService/Service.html\" " |
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
131 |
+ "title=\"interface in pkgService\">Service</a></th>\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
132 |
+ "<td class=\"colLast\">\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
133 |
+ "<div class=\"block\">Provides a service whose name is ServiceProvider.</div>\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
134 |
+ "</td>\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
135 |
+ "</tr>"); |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
136 |
checkOutput("moduleServiceUser/module-summary.html", true, |
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
137 |
"<tr class=\"altColor\">\n" |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
138 |
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"../moduleService/pkgService/Service.html\" title=\"interface in pkgService\">Service</a></th>\n" |
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
139 |
+ "<td class=\"colLast\">\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
140 |
+ "<div class=\"block\">If no other provider is found, a default internal implementation will be used.</div>\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
141 |
+ "</td>\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
142 |
+ "</tr>"); |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
143 |
checkOutput("moduleServiceUserNoDescription/module-summary.html", true, |
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
144 |
"<tr class=\"altColor\">\n" |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
145 |
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"../moduleService/pkgService/Service.html\" title=\"interface in pkgService\">Service</a></th>\n" |
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
146 |
+ "<td class=\"colLast\">\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
147 |
+ "<div class=\"block\">A service Interface for service providers.</div>\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
148 |
+ "</td>\n" |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
149 |
+ "</tr>"); |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
150 |
checkOutput("moduleServiceProvider/module-summary.html", false, |
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
151 |
"A service Interface for service providers."); |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
152 |
checkOutput("moduleServiceUser/module-summary.html", false, |
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
153 |
"A service Interface for service providers."); |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
154 |
} |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
155 |
|
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
156 |
@Test |
44684 | 157 |
public void checkUsesNoApiTagModuleModeDefault(Path base) throws Exception { |
158 |
ModuleBuilder mb = new ModuleBuilder(tb, "m") |
|
159 |
.comment("module m.\n@provides p1.A abc") // bogus tag |
|
160 |
.uses("p1.A") |
|
161 |
.uses("p1.B") |
|
162 |
.exports("p1") |
|
163 |
.classes("package p1; public class A {}") |
|
164 |
.classes("package p1; public class B {}"); |
|
165 |
mb.write(base); |
|
166 |
||
167 |
javadoc("-d", base.toString() + "/out", |
|
168 |
"-quiet", |
|
169 |
"--module-source-path", base.toString(), |
|
170 |
"--module", "m"); |
|
171 |
checkExit(Exit.OK); |
|
172 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
173 |
checkOutput("m/module-summary.html", false, |
44684 | 174 |
"<h3>Services</h3>"); |
175 |
} |
|
176 |
||
177 |
@Test |
|
178 |
public void checkUsesNoApiTagModuleModeAll(Path base) throws Exception { |
|
179 |
ModuleBuilder mb = new ModuleBuilder(tb, "m") |
|
180 |
.uses("p1.A") |
|
181 |
.uses("p1.B") |
|
182 |
.exports("p1") |
|
183 |
.classes("package p1; public class A {}") |
|
184 |
.classes("package p1; public class B {}"); |
|
185 |
mb.write(base); |
|
186 |
||
187 |
javadoc("-d", base.toString() + "/out", |
|
188 |
"-quiet", |
|
189 |
"--show-module-contents", "all", |
|
190 |
"--module-source-path", base.toString(), |
|
191 |
"--module", "m"); |
|
192 |
checkExit(Exit.OK); |
|
193 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
194 |
checkOutput("m/module-summary.html", true, |
44684 | 195 |
"<h3>Services</h3>"); |
196 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
197 |
checkOutput("m/module-summary.html", true, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
198 |
"<table class=\"usesSummary\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
199 |
"<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
200 |
"<tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
201 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
202 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
203 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
204 |
"<tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
205 |
"<tr class=\"altColor\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
206 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
207 |
"<td class=\"colLast\"> </td>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
208 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
209 |
"<tr class=\"rowColor\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
210 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/B.html\" title=\"class in p1\">B</a></th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
211 |
"<td class=\"colLast\"> </td>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
212 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
213 |
"</tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
214 |
"</table>\n"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
215 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
216 |
javadoc("-d", base.toString() + "/out-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
217 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
218 |
"-quiet", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
219 |
"--show-module-contents", "all", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
220 |
"--module-source-path", base.toString(), |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
221 |
"--module", "m"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
222 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
223 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
224 |
checkOutput("m/module-summary.html", true, |
44684 | 225 |
"<table class=\"usesSummary\" summary=\"Uses table, listing types, and an explanation\">\n" + |
226 |
"<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" + |
|
227 |
"<tr>\n" + |
|
228 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
|
229 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
|
230 |
"</tr>\n" + |
|
231 |
"<tbody>\n" + |
|
232 |
"<tr class=\"altColor\">\n" + |
|
233 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" + |
|
234 |
"<td class=\"colLast\"> </td>\n" + |
|
235 |
"</tr>\n" + |
|
236 |
"<tr class=\"rowColor\">\n" + |
|
237 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/B.html\" title=\"class in p1\">B</a></th>\n" + |
|
238 |
"<td class=\"colLast\"> </td>\n" + |
|
239 |
"</tr>\n" + |
|
240 |
"</tbody>\n" + |
|
241 |
"</table>\n"); |
|
242 |
} |
|
243 |
||
244 |
@Test |
|
245 |
public void checkUsesWithApiTagModuleModeDefault(Path base) throws Exception { |
|
246 |
ModuleBuilder mb = new ModuleBuilder(tb, "m") |
|
247 |
.comment("module m.\n@uses p1.A") |
|
248 |
.uses("p1.A") |
|
249 |
.uses("p1.B") |
|
250 |
.exports("p1") |
|
251 |
.classes("package p1; public class A {}") |
|
252 |
.classes("package p1; public class B {}"); |
|
253 |
mb.write(base); |
|
254 |
||
255 |
javadoc("-d", base.toString() + "/out", |
|
256 |
"-quiet", |
|
257 |
"--module-source-path", base.toString(), |
|
258 |
"--module", "m"); |
|
259 |
checkExit(Exit.OK); |
|
260 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
261 |
checkOutput("m/module-summary.html", true, |
44684 | 262 |
"<h3>Services</h3>"); |
263 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
264 |
checkOutput("m/module-summary.html", true, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
265 |
"<table class=\"usesSummary\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
266 |
"<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
267 |
"<tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
268 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
269 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
270 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
271 |
"<tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
272 |
"<tr class=\"altColor\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
273 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
274 |
"<td class=\"colLast\"> </td>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
275 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
276 |
"</tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
277 |
"</table>\n"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
278 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
279 |
javadoc("-d", base.toString() + "/out-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
280 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
281 |
"-quiet", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
282 |
"--module-source-path", base.toString(), |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
283 |
"--module", "m"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
284 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
285 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
286 |
checkOutput("m/module-summary.html", true, |
44684 | 287 |
"<table class=\"usesSummary\" summary=\"Uses table, listing types, and an explanation\">\n" + |
288 |
"<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" + |
|
289 |
"<tr>\n" + |
|
290 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
|
291 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
|
292 |
"</tr>\n" + |
|
293 |
"<tbody>\n" + |
|
294 |
"<tr class=\"altColor\">\n" + |
|
295 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" + |
|
296 |
"<td class=\"colLast\"> </td>\n" + |
|
297 |
"</tr>\n" + |
|
298 |
"</tbody>\n" + |
|
299 |
"</table>\n"); |
|
300 |
} |
|
301 |
||
302 |
@Test |
|
303 |
public void checkProvidesNoApiTagModuleModeDefault(Path base) throws Exception { |
|
304 |
ModuleBuilder mb = new ModuleBuilder(tb, "m") |
|
305 |
.comment("module m.\n@uses p1.A") |
|
306 |
.provides("p1.A", "p1.B") |
|
307 |
.exports("p1") |
|
308 |
.classes("package p1; public interface A {}") |
|
309 |
.classes("package p1; public class B implements A {}") |
|
310 |
.provides("p2.A", "p2.B") |
|
311 |
.exports("p2") |
|
312 |
.classes("package p2; public interface A {}") |
|
313 |
.classes("package p2; public class B implements A {}"); |
|
314 |
mb.write(base); |
|
315 |
||
316 |
javadoc("-d", base.toString() + "/out", |
|
317 |
"-quiet", |
|
318 |
"--module-source-path", base.toString(), |
|
319 |
"--module", "m"); |
|
320 |
||
321 |
checkExit(Exit.OK); |
|
322 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
323 |
checkOutput("m/module-summary.html", false, |
44684 | 324 |
"<h3>Services</h3>"); |
325 |
} |
|
326 |
||
327 |
@Test |
|
328 |
public void checkProvidesNoApiTagModuleModeAll(Path base) throws Exception { |
|
329 |
ModuleBuilder mb = new ModuleBuilder(tb, "m") |
|
330 |
.comment("module m.\n@uses p1.A") // bogus uses tag |
|
331 |
.provides("p1.A", "p1.B") |
|
332 |
.exports("p1") |
|
333 |
.classes("package p1; public interface A {}") |
|
334 |
.classes("package p1; public class B implements A {}") |
|
335 |
.provides("p2.A", "p2.B") |
|
336 |
.exports("p2") |
|
337 |
.classes("package p2; public interface A {}") |
|
338 |
.classes("package p2; public class B implements A {}"); |
|
339 |
mb.write(base); |
|
340 |
||
341 |
javadoc("-d", base.toString() + "/out", |
|
342 |
"-quiet", |
|
343 |
"--show-module-contents", "all", |
|
344 |
"--module-source-path", base.toString(), |
|
345 |
"--module", "m"); |
|
346 |
||
347 |
checkExit(Exit.OK); |
|
348 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
349 |
checkOutput("m/module-summary.html", true, |
44684 | 350 |
"<h3>Services</h3>"); |
351 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
352 |
checkOutput("m/module-summary.html", true, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
353 |
"<table class=\"providesSummary\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
354 |
"<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
355 |
"<tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
356 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
357 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
358 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
359 |
"<tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
360 |
"<tr class=\"altColor\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
361 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
362 |
"<td class=\"colLast\"> <br>(<span class=\"implementationLabel\">Implementation(s):</span> <a href=\"p1/B.html\" title=\"class in p1\">B</a>)</td>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
363 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
364 |
"<tr class=\"rowColor\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
365 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p2/A.html\" title=\"interface in p2\">A</a></th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
366 |
"<td class=\"colLast\"> <br>(<span class=\"implementationLabel\">Implementation(s):</span> <a href=\"p2/B.html\" title=\"class in p2\">B</a>)</td>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
367 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
368 |
"</tbody>\n"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
369 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
370 |
javadoc("-d", base.toString() + "/out-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
371 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
372 |
"-quiet", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
373 |
"--show-module-contents", "all", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
374 |
"--module-source-path", base.toString(), |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
375 |
"--module", "m"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
376 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
377 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
378 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
379 |
checkOutput("m/module-summary.html", true, |
44684 | 380 |
"<table class=\"providesSummary\" summary=\"Provides table, listing types, and an explanation\">\n" + |
381 |
"<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" + |
|
382 |
"<tr>\n" + |
|
383 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
|
384 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
|
385 |
"</tr>\n" + |
|
386 |
"<tbody>\n" + |
|
387 |
"<tr class=\"altColor\">\n" + |
|
388 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" + |
|
389 |
"<td class=\"colLast\"> <br>(<span class=\"implementationLabel\">Implementation(s):</span> <a href=\"p1/B.html\" title=\"class in p1\">B</a>)</td>\n" + |
|
390 |
"</tr>\n" + |
|
391 |
"<tr class=\"rowColor\">\n" + |
|
392 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p2/A.html\" title=\"interface in p2\">A</a></th>\n" + |
|
393 |
"<td class=\"colLast\"> <br>(<span class=\"implementationLabel\">Implementation(s):</span> <a href=\"p2/B.html\" title=\"class in p2\">B</a>)</td>\n" + |
|
394 |
"</tr>\n" + |
|
395 |
"</tbody>\n"); |
|
396 |
} |
|
397 |
||
398 |
@Test |
|
399 |
public void checkProvidesWithApiTagModuleModeDefault(Path base) throws Exception { |
|
400 |
ModuleBuilder mb = new ModuleBuilder(tb, "m") |
|
401 |
.comment("module m.\n@provides p1.A abc") |
|
402 |
.provides("p1.A", "p1.B") |
|
403 |
.exports("p1") |
|
404 |
.classes("package p1; public interface A {}") |
|
405 |
.classes("package p1; public class B implements A {}") |
|
406 |
.provides("p2.A", "p2.B") |
|
407 |
.exports("p2") |
|
408 |
.classes("package p2; public interface A {}") |
|
409 |
.classes("package p2; public class B implements A {}"); |
|
410 |
mb.write(base); |
|
411 |
||
412 |
javadoc("-d", base.toString() + "/out", |
|
413 |
"-quiet", |
|
414 |
"--module-source-path", base.toString(), |
|
415 |
"--module", "m"); |
|
416 |
||
417 |
checkExit(Exit.OK); |
|
418 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
419 |
checkOutput("m/module-summary.html", true, |
44684 | 420 |
"<h3>Services</h3>"); |
421 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
422 |
checkOutput("m/module-summary.html", true, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
423 |
"<table class=\"providesSummary\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
424 |
"<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
425 |
"<tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
426 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
427 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
428 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
429 |
"<tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
430 |
"<tr class=\"altColor\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
431 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
432 |
"<td class=\"colLast\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
433 |
"<div class=\"block\">abc</div>\n</td>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
434 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
435 |
"</tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
436 |
"</table>\n"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
437 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
438 |
javadoc("-d", base.toString() + "/out-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
439 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
440 |
"-quiet", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
441 |
"--module-source-path", base.toString(), |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
442 |
"--module", "m"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
443 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
444 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
445 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
446 |
checkOutput("m/module-summary.html", true, |
44684 | 447 |
"<table class=\"providesSummary\" summary=\"Provides table, listing types, and an explanation\">\n" + |
448 |
"<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" + |
|
449 |
"<tr>\n" + |
|
450 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
|
451 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
|
452 |
"</tr>\n" + |
|
453 |
"<tbody>\n" + |
|
454 |
"<tr class=\"altColor\">\n" + |
|
455 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" + |
|
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
456 |
"<td class=\"colLast\">\n" + |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
457 |
"<div class=\"block\">abc</div>\n</td>\n" + |
44684 | 458 |
"</tr>\n" + |
459 |
"</tbody>\n" + |
|
460 |
"</table>\n"); |
|
461 |
} |
|
462 |
||
463 |
@Test |
|
464 |
public void checkUsesProvidesWithApiTagsModeDefault(Path base) throws Exception { |
|
465 |
ModuleBuilder mb = new ModuleBuilder(tb, "m") |
|
466 |
.comment("module m.\n@provides p1.A abc\n@uses p2.B def") |
|
467 |
.provides("p1.A", "p1.B") |
|
468 |
.exports("p1") |
|
469 |
.classes("package p1; public interface A {}") |
|
470 |
.classes("package p1; public class B implements A {}") |
|
471 |
.provides("p2.A", "p2.B") |
|
472 |
.uses("p2.B") |
|
473 |
.exports("p2") |
|
474 |
.classes("package p2; public interface A {}") |
|
475 |
.classes("package p2; public class B implements A {}"); |
|
476 |
mb.write(base); |
|
477 |
||
478 |
javadoc("-d", base.toString() + "/out", |
|
479 |
"-quiet", |
|
480 |
"--module-source-path", base.toString(), |
|
481 |
"--module", "m"); |
|
482 |
||
483 |
checkExit(Exit.OK); |
|
484 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
485 |
checkOutput("m/module-summary.html", true, |
44684 | 486 |
"<h3>Services</h3>"); |
487 |
||
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48437
diff
changeset
|
488 |
checkOutput("m/module-summary.html", true, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
489 |
"<table class=\"providesSummary\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
490 |
"<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
491 |
"<tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
492 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
493 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
494 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
495 |
"<tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
496 |
"<tr class=\"altColor\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
497 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
498 |
"<td class=\"colLast\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
499 |
"<div class=\"block\">abc</div>\n</td>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
500 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
501 |
"</tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
502 |
"</table>", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
503 |
"<table class=\"usesSummary\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
504 |
"<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
505 |
"<tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
506 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
507 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
508 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
509 |
"<tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
510 |
"<tr class=\"altColor\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
511 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p2/B.html\" title=\"class in p2\">B</a></th>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
512 |
"<td class=\"colLast\">\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
513 |
"<div class=\"block\">def</div>\n</td>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
514 |
"</tr>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
515 |
"</tbody>\n" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
516 |
"</table>\n"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
517 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
518 |
javadoc("-d", base.toString() + "/out-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
519 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
520 |
"-quiet", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
521 |
"--module-source-path", base.toString(), |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
522 |
"--module", "m"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
523 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
524 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
525 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48759
diff
changeset
|
526 |
checkOutput("m/module-summary.html", true, |
44684 | 527 |
"<table class=\"providesSummary\" summary=\"Provides table, listing types, and an explanation\">\n" + |
528 |
"<caption><span>Provides</span><span class=\"tabEnd\"> </span></caption>\n" + |
|
529 |
"<tr>\n" + |
|
530 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
|
531 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
|
532 |
"</tr>\n" + |
|
533 |
"<tbody>\n" + |
|
534 |
"<tr class=\"altColor\">\n" + |
|
535 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" + |
|
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
536 |
"<td class=\"colLast\">\n" + |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
537 |
"<div class=\"block\">abc</div>\n</td>\n" + |
44684 | 538 |
"</tr>\n" + |
539 |
"</tbody>\n" + |
|
540 |
"</table>", |
|
541 |
"<table class=\"usesSummary\" summary=\"Uses table, listing types, and an explanation\">\n" + |
|
542 |
"<caption><span>Uses</span><span class=\"tabEnd\"> </span></caption>\n" + |
|
543 |
"<tr>\n" + |
|
544 |
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" + |
|
545 |
"<th class=\"colLast\" scope=\"col\">Description</th>\n" + |
|
546 |
"</tr>\n" + |
|
547 |
"<tbody>\n" + |
|
548 |
"<tr class=\"altColor\">\n" + |
|
549 |
"<th class=\"colFirst\" scope=\"row\"><a href=\"p2/B.html\" title=\"class in p2\">B</a></th>\n" + |
|
48437
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
550 |
"<td class=\"colLast\">\n" + |
dd3b97564ed7
8192007: javadoc @uses and @provides tags in the modules documentation appears before the first-sentence summary of the service type.
bpatel
parents:
47216
diff
changeset
|
551 |
"<div class=\"block\">def</div>\n</td>\n" + |
44684 | 552 |
"</tr>\n" + |
553 |
"</tbody>\n" + |
|
554 |
"</table>\n"); |
|
555 |
} |
|
556 |
||
557 |
} |