author | ohair |
Tue, 28 Dec 2010 15:54:52 -0800 | |
changeset 7681 | 1f0819a3341f |
parent 7614 | cfadc977ca75 |
child 23971 | f5ff1f5a8dee |
permissions | -rw-r--r-- |
10 | 1 |
/* |
7681 | 2 |
* Copyright (c) 2003, 2010, 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 |
|
49 |
{BUG_ID + FS + "pkg1" + FS + "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\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
51 |
"Class</th>" + NL + "<th class=\"colLast\" scope=\"col\"" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
52 |
">Description</th>" |
10 | 53 |
}, |
54 |
||
55 |
// Class documentation |
|
56 |
{BUG_ID + FS + "pkg1" + FS + "C1.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
57 |
"<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
58 |
"<th class=\"colLast\" scope=\"col\">Field and Description</th>" |
10 | 59 |
}, |
60 |
{BUG_ID + FS + "pkg1" + FS + "C1.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
61 |
"<h3>Methods inherited from class java.lang.Object</h3>" |
10 | 62 |
}, |
63 |
||
64 |
// Class use documentation |
|
65 |
{BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
66 |
"<th class=\"colFirst\" scope=\"col\">Package</th>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
67 |
"<th class=\"colLast\" scope=\"col\">Description</th>" |
10 | 68 |
}, |
69 |
{BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
70 |
"<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
71 |
"<th class=\"colLast\" scope=\"col\">Field and Description</th>" |
10 | 72 |
}, |
73 |
||
74 |
// Deprecated |
|
75 |
{BUG_ID + FS + "deprecated-list.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
76 |
"<th class=\"colOne\" scope=\"col\">Method and Description</th>" |
10 | 77 |
}, |
78 |
||
79 |
// Constant values |
|
80 |
{BUG_ID + FS + "constant-values.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
81 |
"<th class=\"colFirst\" scope=\"col\">" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
82 |
"Modifier and Type</th>" + NL + "<th scope=\"col\">Constant Field</th>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
83 |
"<th class=\"colLast\" scope=\"col\">Value</th>" |
10 | 84 |
}, |
85 |
||
86 |
// Serialized Form |
|
87 |
{BUG_ID + FS + "serialized-form.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
88 |
"<h2 title=\"Package\">Package pkg1</h2>" |
10 | 89 |
}, |
90 |
{BUG_ID + FS + "serialized-form.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
91 |
"<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
|
92 |
"pkg1.C1</a> extends java.lang.Object implements Serializable</h3>" |
10 | 93 |
}, |
94 |
{BUG_ID + FS + "serialized-form.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
95 |
"<h3>Serialized Fields</h3>" |
10 | 96 |
}, |
97 |
||
98 |
// Overview Frame |
|
99 |
{BUG_ID + FS + "overview-frame.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
100 |
"<h1 title=\"Test Files\" class=\"bar\">Test Files</h1>" |
10 | 101 |
}, |
102 |
{BUG_ID + FS + "overview-frame.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
103 |
"<title>Overview List</title>" |
10 | 104 |
}, |
105 |
||
106 |
// Overview Summary |
|
107 |
{BUG_ID + FS + "overview-summary.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
108 |
"<title>Overview</title>" |
10 | 109 |
}, |
110 |
||
111 |
}; |
|
112 |
private static final String[][] NEGATED_TEST = NO_TEST; |
|
113 |
||
114 |
/** |
|
115 |
* The entry point of the test. |
|
116 |
* @param args the array of command line arguments. |
|
117 |
*/ |
|
118 |
public static void main(String[] args) { |
|
119 |
TestHeadings tester = new TestHeadings(); |
|
120 |
run(tester, ARGS, TEST, NEGATED_TEST); |
|
121 |
tester.printSummary(); |
|
122 |
} |
|
123 |
||
124 |
/** |
|
125 |
* {@inheritDoc} |
|
126 |
*/ |
|
127 |
public String getBugId() { |
|
128 |
return BUG_ID; |
|
129 |
} |
|
130 |
||
131 |
/** |
|
132 |
* {@inheritDoc} |
|
133 |
*/ |
|
134 |
public String getBugName() { |
|
135 |
return getClass().getName(); |
|
136 |
} |
|
137 |
} |