author | bpatel |
Fri, 27 Feb 2009 18:57:17 -0800 | |
changeset 2216 | b124d5c924eb |
parent 1787 | 1aa079321cd2 |
child 5520 | 86e4b9a9da40 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
2 |
* Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. |
|
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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
20 |
* CA 95054 USA or visit www.sun.com if you need additional information or |
|
21 |
* have any questions. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
26 |
* @bug 4927552 |
|
27 |
* @summary <DESC> |
|
28 |
* @author jamieh |
|
29 |
* @library ../lib/ |
|
30 |
* @build JavadocTester |
|
31 |
* @build TestDeprecatedDocs |
|
32 |
* @run main TestDeprecatedDocs |
|
33 |
*/ |
|
34 |
||
35 |
public class TestDeprecatedDocs extends JavadocTester { |
|
36 |
||
37 |
//Test information. |
|
38 |
private static final String BUG_ID = "4927552"; |
|
39 |
||
40 |
//Javadoc arguments. |
|
41 |
private static final String[] ARGS = new String[] { |
|
42 |
"-d", BUG_ID, "-source", "1.5", "-sourcepath", SRC_DIR, "pkg" |
|
43 |
}; |
|
44 |
||
45 |
private static final String TARGET_FILE = |
|
46 |
BUG_ID + FS + "deprecated-list.html"; |
|
47 |
||
48 |
private static final String TARGET_FILE2 = |
|
49 |
BUG_ID + FS + "pkg" + FS + "DeprecatedClassByAnnotation.html"; |
|
50 |
||
51 |
//Input for string search tests. |
|
52 |
private static final String[][] TEST = { |
|
53 |
{TARGET_FILE, "annotation_test1 passes"}, |
|
54 |
{TARGET_FILE, "annotation_test2 passes"}, |
|
55 |
{TARGET_FILE, "annotation_test3 passes"}, |
|
56 |
{TARGET_FILE, "class_test1 passes"}, |
|
57 |
{TARGET_FILE, "class_test2 passes"}, |
|
58 |
{TARGET_FILE, "class_test3 passes"}, |
|
59 |
{TARGET_FILE, "class_test4 passes"}, |
|
60 |
{TARGET_FILE, "enum_test1 passes"}, |
|
61 |
{TARGET_FILE, "enum_test2 passes"}, |
|
62 |
{TARGET_FILE, "error_test1 passes"}, |
|
63 |
{TARGET_FILE, "error_test2 passes"}, |
|
64 |
{TARGET_FILE, "error_test3 passes"}, |
|
65 |
{TARGET_FILE, "error_test4 passes"}, |
|
66 |
{TARGET_FILE, "exception_test1 passes"}, |
|
67 |
{TARGET_FILE, "exception_test2 passes"}, |
|
68 |
{TARGET_FILE, "exception_test3 passes"}, |
|
69 |
{TARGET_FILE, "exception_test4 passes"}, |
|
70 |
{TARGET_FILE, "interface_test1 passes"}, |
|
71 |
{TARGET_FILE, "interface_test2 passes"}, |
|
72 |
{TARGET_FILE, "interface_test3 passes"}, |
|
73 |
{TARGET_FILE, "interface_test4 passes"}, |
|
74 |
{TARGET_FILE, "pkg.DeprecatedClassByAnnotation"}, |
|
75 |
{TARGET_FILE, "pkg.DeprecatedClassByAnnotation()"}, |
|
76 |
{TARGET_FILE, "pkg.DeprecatedClassByAnnotation.method()"}, |
|
77 |
{TARGET_FILE, "pkg.DeprecatedClassByAnnotation.field"}, |
|
78 |
||
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
79 |
{TARGET_FILE2, "<STRONG>Deprecated.</STRONG>" + NL + |
10 | 80 |
"<P>" + NL + |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
81 |
"<PRE><FONT SIZE=\"-1\">@Deprecated" + NL + |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
82 |
"</FONT>public class <STRONG>DeprecatedClassByAnnotation</STRONG>"}, |
10 | 83 |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
84 |
{TARGET_FILE2, "public int <STRONG>field</STRONG></PRE>" + NL + |
10 | 85 |
"<DL>" + NL + |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
86 |
"<DD><STRONG>Deprecated.</STRONG> </DD></DL>"}, |
10 | 87 |
|
88 |
{TARGET_FILE2, "<FONT SIZE=\"-1\">@Deprecated" + NL + |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
89 |
"</FONT>public <STRONG>DeprecatedClassByAnnotation</STRONG>()</PRE>" + NL + |
10 | 90 |
"<DL>" + NL + |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
91 |
"<DD><STRONG>Deprecated.</STRONG>"}, |
10 | 92 |
|
93 |
{TARGET_FILE2, "<FONT SIZE=\"-1\">@Deprecated" + NL + |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
94 |
"</FONT>public void <STRONG>method</STRONG>()</PRE>" + NL + |
10 | 95 |
"<DL>" + NL + |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
96 |
"<DD><STRONG>Deprecated.</STRONG>"}, |
10 | 97 |
}; |
98 |
||
99 |
private static final String[][] NEGATED_TEST = NO_TEST; |
|
100 |
||
101 |
/** |
|
102 |
* The entry point of the test. |
|
103 |
* @param args the array of command line arguments. |
|
104 |
*/ |
|
105 |
public static void main(String[] args) { |
|
106 |
TestDeprecatedDocs tester = new TestDeprecatedDocs(); |
|
107 |
run(tester, ARGS, TEST, NEGATED_TEST); |
|
108 |
tester.printSummary(); |
|
109 |
} |
|
110 |
||
111 |
/** |
|
112 |
* {@inheritDoc} |
|
113 |
*/ |
|
114 |
public String getBugId() { |
|
115 |
return BUG_ID; |
|
116 |
} |
|
117 |
||
118 |
/** |
|
119 |
* {@inheritDoc} |
|
120 |
*/ |
|
121 |
public String getBugName() { |
|
122 |
return getClass().getName(); |
|
123 |
} |
|
124 |
} |