author | bpatel |
Thu, 10 Oct 2013 10:51:15 -0700 | |
changeset 21008 | af0b915df7cc |
parent 20257 | 9da4f6c30089 |
child 21478 | fa4c7cda1b41 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
18651 | 2 |
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
10 | 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 |
* |
|
5520 | 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. |
|
10 | 22 |
*/ |
23 |
||
24 |
/* |
|
25 |
* @test |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
26 |
* @bug 4780441 4874845 4978816 8014017 8016328 8025633 |
10 | 27 |
* @summary Make sure that when the -private flag is not used, members |
28 |
* inherited from package private class are documented in the child. |
|
29 |
* |
|
30 |
* Make sure that when a method inherits documentation from a method |
|
31 |
* in a non-public class/interface, the non-public class/interface |
|
32 |
* is not mentioned anywhere (not even in the signature or tree). |
|
33 |
* |
|
34 |
* Make sure that when a private interface method with generic parameters |
|
35 |
* is implemented, the comments can be inherited properly. |
|
18651 | 36 |
* |
37 |
* Make sure when no modifier appear in the class signature, the |
|
38 |
* signature is displayed correctly without extra space at the beginning. |
|
10 | 39 |
* @author jamieh |
40 |
* @library ../lib/ |
|
18651 | 41 |
* @build JavadocTester TestPrivateClasses |
10 | 42 |
* @run main TestPrivateClasses |
43 |
*/ |
|
44 |
||
45 |
public class TestPrivateClasses extends JavadocTester { |
|
46 |
||
47 |
//Test information. |
|
18651 | 48 |
private static final String BUG_ID = "4780441-4874845-4978816-8014017"; |
10 | 49 |
|
50 |
//Javadoc arguments. |
|
51 |
private static final String[] ARGS1 = new String[] { |
|
52 |
"-d", BUG_ID + "-1", "-sourcepath", SRC_DIR, "-source", "1.5", "pkg", "pkg2" |
|
53 |
}; |
|
54 |
private static final String[] ARGS2 = new String[] { |
|
55 |
"-d", BUG_ID + "-2", "-sourcepath", SRC_DIR, "-private", |
|
56 |
"-source", "1.5", "pkg", "pkg2" |
|
57 |
}; |
|
58 |
||
59 |
// Test output when -private flag is not used. |
|
60 |
private static final String[][] TEST1 = { |
|
61 |
// Field inheritence from non-public superclass. |
|
62 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
63 |
"<a href=\"../pkg/PublicChild.html#fieldInheritedFromParent\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
64 |
"fieldInheritedFromParent</a>" |
10 | 65 |
}, |
66 |
||
67 |
// Method inheritence from non-public superclass. |
|
68 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
69 |
"<a href=\"../pkg/PublicChild.html#methodInheritedFromParent-int-\">" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
70 |
"methodInheritedFromParent</a>" |
10 | 71 |
}, |
72 |
||
73 |
// Field inheritence from non-public superinterface. |
|
74 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
75 |
"<a href=\"../pkg/PublicInterface.html#fieldInheritedFromInterface\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
76 |
"fieldInheritedFromInterface</a>" |
10 | 77 |
}, |
78 |
||
79 |
// Method inheritence from non-public superinterface. |
|
80 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
81 |
"<a href=\"../pkg/PublicInterface.html#methodInterface-int-\">" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
82 |
"methodInterface</a>" |
10 | 83 |
}, |
84 |
||
85 |
// private class does not show up in tree |
|
86 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
87 |
"<ul class=\"inheritance\">" + NL + "<li>java.lang.Object</li>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
88 |
"<li>" + NL + "<ul class=\"inheritance\">" + NL + "<li>pkg.PublicChild</li>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
89 |
"</ul>" + NL + "</li>" + NL + "</ul>" |
10 | 90 |
}, |
91 |
||
92 |
// Method is documented as though it is declared in the inheriting method. |
|
93 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
94 |
"<pre>public void methodInheritedFromParent(int p1)" |
10 | 95 |
}, |
96 |
||
97 |
//Make sure implemented interfaces from private superclass are inherited |
|
98 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
99 |
"<dl>" + NL + "<dt>All Known Implementing Classes:</dt>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
100 |
"<dd><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
101 |
"PublicChild</a></dd>" + NL + "</dl>"}, |
10 | 102 |
|
103 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
104 |
"<dl>" + NL + "<dt>All Implemented Interfaces:</dt>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
105 |
"<dd><a href=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
106 |
"PublicInterface</a></dd>" + NL + "</dl>"}, |
10 | 107 |
|
108 |
//Generic interface method test. |
|
109 |
{BUG_ID + "-1" + FS + "pkg2" + FS + "C.html", |
|
110 |
"This comment should get copied to the implementing class"}, |
|
111 |
}; |
|
112 |
private static final String[][] NEGATED_TEST1 = { |
|
113 |
// Should not document that a method overrides method from private class. |
|
114 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
19253
b97b3e18547f
7198274: RFE : Javadoc Accessibility : Use CSS styles rather than <strong> or <i> tags
bpatel
parents:
18651
diff
changeset
|
115 |
"<span class=\"strong\">Overrides:</span>"}, |
10 | 116 |
// Should not document that a method specified by private interface. |
117 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
19253
b97b3e18547f
7198274: RFE : Javadoc Accessibility : Use CSS styles rather than <strong> or <i> tags
bpatel
parents:
18651
diff
changeset
|
118 |
"<span class=\"strong\">Specified by:</span>"}, |
10 | 119 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", |
19253
b97b3e18547f
7198274: RFE : Javadoc Accessibility : Use CSS styles rather than <strong> or <i> tags
bpatel
parents:
18651
diff
changeset
|
120 |
"<span class=\"strong\">Specified by:</span>"}, |
10 | 121 |
// Should not mention that any documentation was copied. |
122 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
123 |
"Description copied from"}, |
|
124 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", |
|
125 |
"Description copied from"}, |
|
126 |
// Don't extend private classes or interfaces |
|
127 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
128 |
"PrivateParent"}, |
|
129 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", |
|
130 |
"PrivateInterface"}, |
|
131 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", |
|
132 |
"PrivateInterface"}, |
|
133 |
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", |
|
134 |
"All Superinterfaces"}, |
|
135 |
// Make inherited constant are documented correctly. |
|
136 |
{BUG_ID + "-1" + FS + "constant-values.html", |
|
137 |
"PrivateInterface"}, |
|
138 |
||
139 |
//Do not inherit private interface method with generic parameters. |
|
140 |
//This method has been implemented. |
|
141 |
{BUG_ID + "-1" + FS + "pkg2" + FS + "C.html", |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
142 |
"<span class=\"strong\"><a href=\"../pkg2/I.html#hello-T-\">hello</a></span>"}, |
10 | 143 |
}; |
144 |
||
145 |
// Test output when -private flag is used. |
|
146 |
private static final String[][] TEST2 = { |
|
147 |
// Field inheritence from non-public superclass. |
|
148 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
149 |
"Fields inherited from class pkg." + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
150 |
"<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
151 |
"PrivateParent</a>" |
10 | 152 |
}, |
153 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
154 |
"<a href=\"../pkg/PrivateParent.html#fieldInheritedFromParent\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
155 |
"fieldInheritedFromParent</a>" |
10 | 156 |
}, |
157 |
// Field inheritence from non-public superinterface. |
|
158 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
159 |
"Fields inherited from interface pkg." + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
160 |
"<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
161 |
"PrivateInterface</a>" |
10 | 162 |
}, |
163 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
164 |
"<a href=\"../pkg/PrivateInterface.html#fieldInheritedFromInterface\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
165 |
"fieldInheritedFromInterface</a>" |
10 | 166 |
}, |
167 |
// Method inheritence from non-public superclass. |
|
168 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
169 |
"Methods inherited from class pkg." + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
170 |
"<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
171 |
"PrivateParent</a>" |
10 | 172 |
}, |
173 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
174 |
"<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent-int-\">" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
175 |
"methodInheritedFromParent</a>" |
10 | 176 |
}, |
177 |
// Should document that a method overrides method from private class. |
|
178 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
19253
b97b3e18547f
7198274: RFE : Javadoc Accessibility : Use CSS styles rather than <strong> or <i> tags
bpatel
parents:
18651
diff
changeset
|
179 |
"<dt><span class=\"strong\">Overrides:</span></dt>" + NL + |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
180 |
"<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
181 |
"methodOverridenFromParent</a></code> in class <code>" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
182 |
"<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
183 |
"PrivateParent</a></code></dd>"}, |
10 | 184 |
// Should document that a method is specified by private interface. |
185 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
19253
b97b3e18547f
7198274: RFE : Javadoc Accessibility : Use CSS styles rather than <strong> or <i> tags
bpatel
parents:
18651
diff
changeset
|
186 |
"<dt><span class=\"strong\">Specified by:</span></dt>" + NL + |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
187 |
"<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
188 |
"methodInterface</a></code> in interface <code>" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
189 |
"<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
190 |
"PrivateInterface</a></code></dd>"}, |
10 | 191 |
// Method inheritence from non-public superinterface. |
192 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
193 |
"Methods inherited from interface pkg." + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
194 |
"<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
195 |
"PrivateInterface</a>" |
10 | 196 |
}, |
197 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PrivateInterface.html", |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
198 |
"<a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
199 |
"methodInterface</a>" |
10 | 200 |
}, |
201 |
// Should mention that any documentation was copied. |
|
202 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
203 |
"Description copied from"}, |
|
204 |
// Extend documented private classes or interfaces |
|
205 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
206 |
"extends"}, |
|
207 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", |
|
208 |
"extends"}, |
|
209 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", |
|
210 |
"All Superinterfaces"}, |
|
211 |
||
212 |
//Make sure implemented interfaces from private superclass are inherited |
|
213 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
214 |
"<dl>" + NL + "<dt>All Known Implementing Classes:</dt>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
215 |
"<dd><a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
216 |
"PrivateParent</a>, " + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
217 |
"<a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
218 |
"</a></dd>" + NL + "</dl>"}, |
10 | 219 |
|
220 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
221 |
"<dl>" + NL + "<dt>All Implemented Interfaces:</dt>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
222 |
"<dd><a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
223 |
"PrivateInterface</a>, " + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
224 |
"<a href=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
225 |
"PublicInterface</a></dd>" + NL + "</dl>"}, |
10 | 226 |
|
227 |
//Since private flag is used, we can document that private interface method |
|
228 |
//with generic parameters has been implemented. |
|
229 |
{BUG_ID + "-2" + FS + "pkg2" + FS + "C.html", |
|
19253
b97b3e18547f
7198274: RFE : Javadoc Accessibility : Use CSS styles rather than <strong> or <i> tags
bpatel
parents:
18651
diff
changeset
|
230 |
"<span class=\"strong\">Description copied from interface: <code>" + |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
231 |
"<a href=\"../pkg2/I.html#hello-T-\">I</a></code></span>"}, |
10 | 232 |
|
233 |
{BUG_ID + "-2" + FS + "pkg2" + FS + "C.html", |
|
19253
b97b3e18547f
7198274: RFE : Javadoc Accessibility : Use CSS styles rather than <strong> or <i> tags
bpatel
parents:
18651
diff
changeset
|
234 |
"<dt><span class=\"strong\">Specified by:</span></dt>" + NL + |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
20257
diff
changeset
|
235 |
"<dd><code><a href=\"../pkg2/I.html#hello-T-\">hello</a></code>" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
236 |
" in interface <code>" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
237 |
"<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
238 |
"<java.lang.String></code></dd>"}, |
18651 | 239 |
|
240 |
//Make sure when no modifier appear in the class signature, the |
|
241 |
//signature is displayed correctly without extra space at the beginning. |
|
242 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PrivateParent.html", |
|
243 |
"<pre>class <span class=\"strong\">PrivateParent</span>"}, |
|
244 |
||
245 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
246 |
"<pre>public class <span class=\"strong\">PublicChild</span>"}, |
|
10 | 247 |
}; |
18651 | 248 |
private static final String[][] NEGATED_TEST2 = { |
249 |
{BUG_ID + "-2" + FS + "pkg" + FS + "PrivateParent.html", |
|
250 |
"<pre> class <span class=\"strong\">PrivateParent</span>"}, |
|
251 |
}; |
|
10 | 252 |
|
253 |
/** |
|
254 |
* The entry point of the test. |
|
255 |
* @param args the array of command line arguments. |
|
256 |
*/ |
|
257 |
public static void main(String[] args) { |
|
258 |
TestPrivateClasses tester = new TestPrivateClasses(); |
|
259 |
run(tester, ARGS1, TEST1, NEGATED_TEST1); |
|
260 |
run(tester, ARGS2, TEST2, NEGATED_TEST2); |
|
261 |
tester.printSummary(); |
|
262 |
} |
|
263 |
||
264 |
/** |
|
265 |
* {@inheritDoc} |
|
266 |
*/ |
|
267 |
public String getBugId() { |
|
268 |
return BUG_ID; |
|
269 |
} |
|
270 |
||
271 |
/** |
|
272 |
* {@inheritDoc} |
|
273 |
*/ |
|
274 |
public String getBugName() { |
|
275 |
return getClass().getName(); |
|
276 |
} |
|
277 |
} |