author | jjg |
Fri, 18 Apr 2014 17:25:43 -0700 | |
changeset 24065 | fc4022e50129 |
parent 23971 | f5ff1f5a8dee |
child 24071 | b0845717434e |
permissions | -rw-r--r-- |
10 | 1 |
/* |
23971 | 2 |
* Copyright (c) 2003, 2014, 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 |
|
26 |
* @bug 4905786 6259611 |
|
27 |
* @summary Make sure that headings use the TH tag instead of the TD tag. |
|
28 |
* @author jamieh |
|
29 |
* @library ../lib/ |
|
30 |
* @build JavadocTester |
|
31 |
* @build TestHeadings |
|
32 |
* @run main TestHeadings |
|
33 |
*/ |
|
34 |
||
35 |
public class TestHeadings extends JavadocTester { |
|
36 |
||
37 |
//Test information. |
|
38 |
private static final String BUG_ID = "4905786-6259611"; |
|
39 |
||
40 |
//Javadoc arguments. |
|
41 |
private static final String[] ARGS = new String[] { |
|
42 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "-header", "Test Files", |
|
43 |
"pkg1", "pkg2" |
|
44 |
}; |
|
45 |
||
46 |
//Input for string search tests. |
|
47 |
private static final String[][] TEST = { |
|
48 |
//Package summary |
|
23971 | 49 |
{BUG_ID + "/pkg1/package-summary.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
50 |
"<th class=\"colFirst\" scope=\"col\">" + |
23971 | 51 |
"Class</th>\n" + |
52 |
"<th class=\"colLast\" scope=\"col\"" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
53 |
">Description</th>" |
10 | 54 |
}, |
55 |
||
56 |
// Class documentation |
|
23971 | 57 |
{BUG_ID + "/pkg1/C1.html", |
58 |
"<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
59 |
"<th class=\"colLast\" scope=\"col\">Field and Description</th>" |
10 | 60 |
}, |
23971 | 61 |
{BUG_ID + "/pkg1/C1.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
62 |
"<h3>Methods inherited from class java.lang.Object</h3>" |
10 | 63 |
}, |
64 |
||
65 |
// Class use documentation |
|
23971 | 66 |
{BUG_ID + "/pkg1/class-use/C1.html", |
67 |
"<th class=\"colFirst\" scope=\"col\">Package</th>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
68 |
"<th class=\"colLast\" scope=\"col\">Description</th>" |
10 | 69 |
}, |
23971 | 70 |
{BUG_ID + "/pkg1/class-use/C1.html", |
71 |
"<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
72 |
"<th class=\"colLast\" scope=\"col\">Field and Description</th>" |
10 | 73 |
}, |
74 |
||
75 |
// Deprecated |
|
23971 | 76 |
{BUG_ID + "/deprecated-list.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
77 |
"<th class=\"colOne\" scope=\"col\">Method and Description</th>" |
10 | 78 |
}, |
79 |
||
80 |
// Constant values |
|
23971 | 81 |
{BUG_ID + "/constant-values.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
82 |
"<th class=\"colFirst\" scope=\"col\">" + |
23971 | 83 |
"Modifier and Type</th>\n" + |
84 |
"<th scope=\"col\">Constant Field</th>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
85 |
"<th class=\"colLast\" scope=\"col\">Value</th>" |
10 | 86 |
}, |
87 |
||
88 |
// Serialized Form |
|
23971 | 89 |
{BUG_ID + "/serialized-form.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
90 |
"<h2 title=\"Package\">Package pkg1</h2>" |
10 | 91 |
}, |
23971 | 92 |
{BUG_ID + "/serialized-form.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
93 |
"<h3>Class <a href=\"pkg1/C1.html\" title=\"class in pkg1\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
94 |
"pkg1.C1</a> extends java.lang.Object implements Serializable</h3>" |
10 | 95 |
}, |
23971 | 96 |
{BUG_ID + "/serialized-form.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
97 |
"<h3>Serialized Fields</h3>" |
10 | 98 |
}, |
99 |
||
100 |
// Overview Frame |
|
23971 | 101 |
{BUG_ID + "/overview-frame.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
102 |
"<h1 title=\"Test Files\" class=\"bar\">Test Files</h1>" |
10 | 103 |
}, |
23971 | 104 |
{BUG_ID + "/overview-frame.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
105 |
"<title>Overview List</title>" |
10 | 106 |
}, |
107 |
||
108 |
// Overview Summary |
|
23971 | 109 |
{BUG_ID + "/overview-summary.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
110 |
"<title>Overview</title>" |
10 | 111 |
}, |
112 |
||
113 |
}; |
|
114 |
private static final String[][] NEGATED_TEST = NO_TEST; |
|
115 |
||
116 |
/** |
|
117 |
* The entry point of the test. |
|
118 |
* @param args the array of command line arguments. |
|
119 |
*/ |
|
120 |
public static void main(String[] args) { |
|
121 |
TestHeadings tester = new TestHeadings(); |
|
24065
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
122 |
tester.run(ARGS, TEST, NEGATED_TEST); |
10 | 123 |
tester.printSummary(); |
124 |
} |
|
125 |
||
126 |
/** |
|
127 |
* {@inheritDoc} |
|
128 |
*/ |
|
129 |
public String getBugId() { |
|
130 |
return BUG_ID; |
|
131 |
} |
|
132 |
||
133 |
/** |
|
134 |
* {@inheritDoc} |
|
135 |
*/ |
|
136 |
public String getBugName() { |
|
137 |
return getClass().getName(); |
|
138 |
} |
|
139 |
} |