author | jjg |
Thu, 21 Feb 2019 14:03:57 -0800 | |
changeset 53879 | e7cb0348fa1c |
parent 53562 | 0d9dee001667 |
child 53883 | f41793b5b83f |
permissions | -rw-r--r-- |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
1 |
/* |
53391
a99bd2570660
8217034: JavadocTester should check for missing files by default
jjg
parents:
53097
diff
changeset
|
2 |
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
4 |
* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
8 |
* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
13 |
* accompanied this code). |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
14 |
* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
18 |
* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
21 |
* questions. |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
22 |
*/ |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
23 |
|
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
24 |
/* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
25 |
* @test |
53391
a99bd2570660
8217034: JavadocTester should check for missing files by default
jjg
parents:
53097
diff
changeset
|
26 |
* @bug 4749567 8071982 8175200 8186332 8185371 8182765 8217034 |
47748
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
27 |
* @summary Test the output for -header, -footer, -nooverview, -nodeprecatedlist, -nonavbar, -notree, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
28 |
* -stylesheetfile, --main-stylesheet, --add-stylesheet options. |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
29 |
* @author Bhavesh Patel |
53097 | 30 |
* @library ../../lib |
36526 | 31 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
53097 | 32 |
* @build javadoc.tester.* |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
33 |
* @run main TestOptions |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
34 |
*/ |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
35 |
|
36705 | 36 |
import java.io.File; |
37 |
||
53097 | 38 |
import javadoc.tester.JavadocTester; |
39 |
||
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
40 |
public class TestOptions extends JavadocTester { |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
41 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
42 |
public static void main(String... args) throws Exception { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
43 |
TestOptions tester = new TestOptions(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
44 |
tester.runTests(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
45 |
} |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
46 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
47 |
@Test |
53097 | 48 |
public void testHeaderFooter() { |
36705 | 49 |
javadoc("-d", "out-1", |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
50 |
"-header", "Test header", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
51 |
"-footer", "Test footer", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
52 |
"-sourcepath", testSrc, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
53 |
"pkg"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
54 |
checkExit(Exit.OK); |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
55 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
56 |
checkOutput("pkg/package-summary.html", true, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
57 |
"<div class=\"aboutLanguage\">Test header</div>", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
58 |
"<div class=\"aboutLanguage\">Test footer</div>"); |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
59 |
} |
36705 | 60 |
|
61 |
@Test |
|
53097 | 62 |
public void testNoOverview() { |
36705 | 63 |
javadoc("-d", "out-4", |
64 |
"-nooverview", |
|
65 |
"-sourcepath", testSrc, |
|
66 |
"pkg", "deprecated"); |
|
67 |
||
68 |
checkExit(Exit.OK); |
|
69 |
||
70 |
checkFiles(false, "overview-summary.html"); |
|
71 |
} |
|
72 |
||
73 |
@Test |
|
53097 | 74 |
public void testNoDeprecatedList() { |
36705 | 75 |
javadoc("-d", "out-5", |
76 |
"-nodeprecatedlist", |
|
77 |
"-sourcepath", testSrc, |
|
78 |
"deprecated"); |
|
79 |
checkExit(Exit.OK); |
|
80 |
||
81 |
checkFiles(false, "deprecated-list.html"); |
|
82 |
} |
|
83 |
||
84 |
@Test |
|
53097 | 85 |
public void testNoNavbar() { |
36705 | 86 |
javadoc("-d", "out-6", |
87 |
"-nonavbar", |
|
88 |
"-bottom", "Bottom text", |
|
89 |
"-sourcepath", testSrc, |
|
90 |
"pkg"); |
|
91 |
checkExit(Exit.OK); |
|
92 |
||
93 |
checkOutput("pkg/Foo.html", false, "navbar"); |
|
94 |
checkOutput("pkg/Foo.html", true, "Bottom text"); |
|
95 |
} |
|
96 |
||
97 |
@Test |
|
53097 | 98 |
public void testNoTree() { |
36705 | 99 |
javadoc("-d", "out-7", |
100 |
"-notree", |
|
101 |
"-sourcepath", testSrc, |
|
102 |
"pkg"); |
|
103 |
checkExit(Exit.OK); |
|
104 |
||
105 |
checkFiles(false, "overview-tree.html"); |
|
106 |
checkFiles(false, "pkg/package-tree.html"); |
|
107 |
checkOutput("pkg/Foo.html", false, "<li><a href=\"package-tree.html\">Tree</a></li>"); |
|
108 |
} |
|
109 |
||
110 |
@Test |
|
53097 | 111 |
public void testStylesheetFile() { |
36705 | 112 |
javadoc("-d", "out-8", |
113 |
"-stylesheetfile", new File(testSrc, "custom-stylesheet.css").getAbsolutePath(), |
|
114 |
"-sourcepath", testSrc, |
|
115 |
"pkg"); |
|
116 |
checkExit(Exit.OK); |
|
117 |
||
118 |
checkOutput("custom-stylesheet.css", true, "Custom javadoc style sheet"); |
|
119 |
checkOutput("pkg/Foo.html", true, "<link rel=\"stylesheet\" type=\"text/css\" " |
|
120 |
+ "href=\"../custom-stylesheet.css\" title=\"Style\">"); |
|
121 |
} |
|
122 |
||
123 |
@Test |
|
53097 | 124 |
public void testStylesheetFileAltOption() { |
47748
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
125 |
javadoc("-d", "out-stylesheet-file", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
126 |
"--main-stylesheet", new File(testSrc, "custom-stylesheet.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
127 |
"-sourcepath", testSrc, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
128 |
"pkg"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
129 |
checkExit(Exit.OK); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
130 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
131 |
checkOutput("custom-stylesheet.css", true, "Custom javadoc style sheet"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
132 |
checkOutput("pkg/Foo.html", true, "<link rel=\"stylesheet\" type=\"text/css\" " |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
133 |
+ "href=\"../custom-stylesheet.css\" title=\"Style\">"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
134 |
} |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
135 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
136 |
@Test |
53097 | 137 |
public void testAdditionalStylesheetFile() { |
47748
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
138 |
javadoc("-d", "out-additional-css", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
139 |
"--add-stylesheet", new File(testSrc, "additional-stylesheet-1.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
140 |
"--add-stylesheet", new File(testSrc, "additional-stylesheet-2.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
141 |
"--add-stylesheet", new File(testSrc, "additional-stylesheet-3.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
142 |
"-sourcepath", testSrc, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
143 |
"pkg"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
144 |
checkExit(Exit.OK); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
145 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
146 |
checkOutput("additional-stylesheet-1.css", true, "Additional javadoc style sheet 1"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
147 |
checkOutput("additional-stylesheet-2.css", true, "Additional javadoc style sheet 2"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
148 |
checkOutput("additional-stylesheet-3.css", true, "Additional javadoc style sheet 3"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
149 |
checkOutput("pkg/Foo.html", true, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
150 |
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-1.css\" title=\"Style\">\n" |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
151 |
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-2.css\" title=\"Style\">\n" |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
152 |
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-3.css\" title=\"Style\">"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
153 |
} |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
154 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
155 |
@Test |
53097 | 156 |
public void testInvalidStylesheetFile() { |
47748
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
157 |
javadoc("-d", "out-invalid-css", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
158 |
"--main-stylesheet", new File(testSrc, "custom-stylesheet-1.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
159 |
"-sourcepath", testSrc, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
160 |
"pkg"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
161 |
checkExit(Exit.ERROR); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
162 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
163 |
checkOutput(Output.OUT, true, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
164 |
"javadoc: error - File not found:", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
165 |
"custom-stylesheet-1.css"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
166 |
} |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
167 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
168 |
@Test |
53097 | 169 |
public void testInvalidAdditionalStylesheetFiles() { |
47748
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
170 |
javadoc("-d", "out-invalid-additional-css", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
171 |
"--add-stylesheet", new File(testSrc, "additional-stylesheet-4.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
172 |
"-sourcepath", testSrc, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
173 |
"pkg"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
174 |
checkExit(Exit.ERROR); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
175 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
176 |
checkOutput(Output.OUT, true, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
177 |
"javadoc: error - File not found:", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
178 |
"additional-stylesheet-4.css"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
179 |
} |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
180 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
181 |
@Test |
53097 | 182 |
public void testLinkSource() { |
36705 | 183 |
javadoc("-d", "out-9", |
184 |
"-linksource", |
|
185 |
"-javafx", |
|
49879
601277b1d582
8025091: VisibleMemberMap.java possible performance improvements
ksrini
parents:
49139
diff
changeset
|
186 |
"--disable-javafx-strict-checks", |
36705 | 187 |
"-sourcepath", testSrc, |
188 |
"-package", |
|
189 |
"linksource"); |
|
190 |
checkExit(Exit.OK); |
|
191 |
||
192 |
checkOutput("linksource/AnnotationTypeField.html", true, |
|
193 |
"<pre>@Documented\npublic @interface <a href=" |
|
194 |
+ "\"../src-html/linksource/AnnotationTypeField.html#line.31\">" |
|
195 |
+ "AnnotationTypeField</a></pre>", |
|
53879 | 196 |
"<h3>DEFAULT_NAME</h3>\n<pre>static final java.lang.String " |
36705 | 197 |
+ "<a href=\"../src-html/linksource/AnnotationTypeField.html#line.32\">" |
198 |
+ "DEFAULT_NAME</a></pre>", |
|
53879 | 199 |
"<h3>name</h3>\n<pre>java.lang.String <a href=" |
36705 | 200 |
+ "\"../src-html/linksource/AnnotationTypeField.html#line.34\">name</a></pre>"); |
201 |
||
202 |
checkOutput("src-html/linksource/AnnotationTypeField.html", true, |
|
203 |
"<title>Source code</title>", |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
204 |
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\">" |
36705 | 205 |
+ "@Documented public @interface AnnotationTypeField {</a>"); |
206 |
||
207 |
checkOutput("linksource/Properties.html", true, |
|
208 |
"<pre>public class <a href=\"../src-html/linksource/Properties.html#line.29\">" |
|
209 |
+ "Properties</a>", |
|
210 |
"<pre>public java.lang.Object <a href=" |
|
211 |
+ "\"../src-html/linksource/Properties.html#line.31\">someProperty</a></pre>", |
|
51127
c2e676c2cf7b
8207190: JDK 11 javadoc generates bad code example
pmuthuswamy
parents:
49879
diff
changeset
|
212 |
"<pre class=\"methodSignature\">public java.lang.Object <a href=" |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
213 |
+ "\"../src-html/linksource/Properties.html#line.31\">someProperty</a>()</pre>"); |
36705 | 214 |
|
215 |
checkOutput("src-html/linksource/Properties.html", true, |
|
216 |
"<title>Source code</title>", |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
217 |
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> " |
36705 | 218 |
+ "public Object someProperty() {</a>"); |
219 |
||
220 |
checkOutput("linksource/SomeClass.html", true, |
|
221 |
"<pre>public class <a href=\"../src-html/linksource/SomeClass.html#line.29\">" |
|
222 |
+ "SomeClass</a>\nextends java.lang.Object</pre>", |
|
223 |
"<pre>public int <a href=\"../src-html/linksource/SomeClass.html#line.31\">" |
|
224 |
+ "field</a></pre>", |
|
225 |
"<pre>public <a href=\"../src-html/linksource/SomeClass.html#line.33\">" |
|
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
226 |
+ "SomeClass</a>()</pre>", |
51127
c2e676c2cf7b
8207190: JDK 11 javadoc generates bad code example
pmuthuswamy
parents:
49879
diff
changeset
|
227 |
"<pre class=\"methodSignature\">public int <a href=\"../src-html/linksource/SomeClass.html#line.36\">" |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
228 |
+ "method</a>()</pre>"); |
36705 | 229 |
|
230 |
checkOutput("src-html/linksource/SomeClass.html", true, |
|
231 |
"<title>Source code</title>", |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
232 |
"<span class=\"sourceLineNo\">029</span><a id=\"line.29\">" |
36705 | 233 |
+ "public class SomeClass {</a>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
234 |
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> " |
36705 | 235 |
+ "public int field;</a>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
236 |
"<span class=\"sourceLineNo\">033</span><a id=\"line.33\"> " |
36705 | 237 |
+ "public SomeClass() {</a>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
238 |
"<span class=\"sourceLineNo\">036</span><a id=\"line.36\"> " |
36705 | 239 |
+ "public int method() {</a>"); |
240 |
||
241 |
checkOutput("linksource/SomeEnum.html", true, |
|
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47748
diff
changeset
|
242 |
"<pre>public static final <a href=\"SomeEnum.html\" " |
36705 | 243 |
+ "title=\"enum in linksource\">SomeEnum</a> <a href=" |
244 |
+ "\"../src-html/linksource/SomeEnum.html#line.29\">VALUE1</a></pre>", |
|
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47748
diff
changeset
|
245 |
"<pre>public static final <a href=\"SomeEnum.html\" " |
36705 | 246 |
+ "title=\"enum in linksource\">SomeEnum</a> <a href=" |
247 |
+ "\"../src-html/linksource/SomeEnum.html#line.30\">VALUE2</a></pre>"); |
|
248 |
||
249 |
checkOutput("src-html/linksource/SomeEnum.html", true, |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
250 |
"<span class=\"sourceLineNo\">029</span><a id=\"line.29\"> VALUE1,</a>", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
251 |
"<span class=\"sourceLineNo\">030</span><a id=\"line.30\"> VALUE2</a>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
252 |
} |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
253 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
254 |
@Test |
53097 | 255 |
public void testNoQualifier() { |
36705 | 256 |
javadoc("-d", "out-10", |
257 |
"-noqualifier", "pkg", |
|
258 |
"-sourcepath", testSrc, |
|
259 |
"pkg", "deprecated"); |
|
260 |
checkExit(Exit.OK); |
|
261 |
||
262 |
checkOutput("pkg/Foo.html", true, |
|
263 |
"<li>Foo</li>"); |
|
264 |
checkOutput("deprecated/Foo.html", true, |
|
265 |
"<li>deprecated.Foo</li>"); |
|
266 |
||
267 |
javadoc("-d", "out-10a", |
|
268 |
"-noqualifier", "all", |
|
269 |
"-sourcepath", testSrc, |
|
270 |
"pkg", "deprecated"); |
|
271 |
checkExit(Exit.OK); |
|
272 |
||
273 |
checkOutput("pkg/Foo.html", true, |
|
274 |
"<li>Foo</li>"); |
|
275 |
checkOutput("deprecated/Foo.html", true, |
|
276 |
"<li>Foo</li>"); |
|
277 |
} |
|
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
278 |
} |