author | lana |
Thu, 20 Jan 2011 10:49:03 -0800 | |
changeset 7957 | 900a9e8d6c4e |
parent 7681 | 1f0819a3341f |
child 9083 | 63f3c4d2d992 |
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 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 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
79 |
{TARGET_FILE2, "<pre>@Deprecated" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
80 |
"public class <strong>DeprecatedClassByAnnotation</strong>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
81 |
"extends java.lang.Object</pre>"}, |
10 | 82 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
83 |
{TARGET_FILE2, "<pre>@Deprecated" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
84 |
"public int field</pre>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
85 |
"<div class=\"block\"><span class=\"strong\">Deprecated.</span> </div>"}, |
10 | 86 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
87 |
{TARGET_FILE2, "<pre>@Deprecated" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
88 |
"public DeprecatedClassByAnnotation()</pre>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
89 |
"<div class=\"block\"><span class=\"strong\">Deprecated.</span> </div>"}, |
10 | 90 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
91 |
{TARGET_FILE2, "<pre>@Deprecated" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
92 |
"public void method()</pre>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
93 |
"<div class=\"block\"><span class=\"strong\">Deprecated.</span> </div>"}, |
10 | 94 |
}; |
95 |
||
96 |
private static final String[][] NEGATED_TEST = NO_TEST; |
|
97 |
||
98 |
/** |
|
99 |
* The entry point of the test. |
|
100 |
* @param args the array of command line arguments. |
|
101 |
*/ |
|
102 |
public static void main(String[] args) { |
|
103 |
TestDeprecatedDocs tester = new TestDeprecatedDocs(); |
|
104 |
run(tester, ARGS, TEST, NEGATED_TEST); |
|
105 |
tester.printSummary(); |
|
106 |
} |
|
107 |
||
108 |
/** |
|
109 |
* {@inheritDoc} |
|
110 |
*/ |
|
111 |
public String getBugId() { |
|
112 |
return BUG_ID; |
|
113 |
} |
|
114 |
||
115 |
/** |
|
116 |
* {@inheritDoc} |
|
117 |
*/ |
|
118 |
public String getBugName() { |
|
119 |
return getClass().getName(); |
|
120 |
} |
|
121 |
} |