35 * @run main TestInterface |
35 * @run main TestInterface |
36 */ |
36 */ |
37 |
37 |
38 public class TestInterface extends JavadocTester { |
38 public class TestInterface extends JavadocTester { |
39 |
39 |
40 //Test information. |
|
41 private static final String BUG_ID = "4682448-4947464-5029946"; |
|
42 |
|
43 //Javadoc arguments. |
40 //Javadoc arguments. |
44 private static final String[] ARGS = new String[] { |
41 private static final String[] ARGS = new String[] { |
45 "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" |
42 "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg" |
46 }; |
43 }; |
47 |
44 |
48 //Input for string search tests. |
45 //Input for string search tests. |
49 private static final String[][] TEST = { |
46 private static final String[][] TEST = { |
50 {BUG_ID + "/pkg/Interface.html", |
47 { "pkg/Interface.html", |
51 "<pre>int method()</pre>"}, |
48 "<pre>int method()</pre>"}, |
52 {BUG_ID + "/pkg/Interface.html", |
49 { "pkg/Interface.html", |
53 "<pre>static final int field</pre>"}, |
50 "<pre>static final int field</pre>"}, |
54 |
51 |
55 |
52 |
56 // Make sure known implementing class list is correct and omits type parameters. |
53 // Make sure known implementing class list is correct and omits type parameters. |
57 {BUG_ID + "/pkg/Interface.html", |
54 { "pkg/Interface.html", |
58 "<dl>\n" + |
55 "<dl>\n" + |
59 "<dt>All Known Implementing Classes:</dt>\n" + |
56 "<dt>All Known Implementing Classes:</dt>\n" + |
60 "<dd><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child" + |
57 "<dd><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child" + |
61 "</a>, <a href=\"../pkg/Parent.html\" title=\"class in pkg\">Parent" + |
58 "</a>, <a href=\"../pkg/Parent.html\" title=\"class in pkg\">Parent" + |
62 "</a></dd>\n" + |
59 "</a></dd>\n" + |
63 "</dl>"}, |
60 "</dl>"}, |
64 |
61 |
65 // Make sure "All Implemented Interfaces": has substituted type parameters |
62 // Make sure "All Implemented Interfaces": has substituted type parameters |
66 {BUG_ID + "/pkg/Child.html", |
63 { "pkg/Child.html", |
67 "<dl>\n" + |
64 "<dl>\n" + |
68 "<dt>All Implemented Interfaces:</dt>\n" + |
65 "<dt>All Implemented Interfaces:</dt>\n" + |
69 "<dd><a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" + |
66 "<dd><a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" + |
70 "Interface</a><T></dd>\n" + |
67 "Interface</a><T></dd>\n" + |
71 "</dl>" |
68 "</dl>" |
72 }, |
69 }, |
73 //Make sure Class Tree has substituted type parameters. |
70 //Make sure Class Tree has substituted type parameters. |
74 {BUG_ID + "/pkg/Child.html", |
71 { "pkg/Child.html", |
75 "<ul class=\"inheritance\">\n" + |
72 "<ul class=\"inheritance\">\n" + |
76 "<li>java.lang.Object</li>\n" + |
73 "<li>java.lang.Object</li>\n" + |
77 "<li>\n" + |
74 "<li>\n" + |
78 "<ul class=\"inheritance\">\n" + |
75 "<ul class=\"inheritance\">\n" + |
79 "<li><a href=\"../pkg/Parent.html\" title=\"class in pkg\">" + |
76 "<li><a href=\"../pkg/Parent.html\" title=\"class in pkg\">" + |
86 "</ul>\n" + |
83 "</ul>\n" + |
87 "</li>\n" + |
84 "</li>\n" + |
88 "</ul>" |
85 "</ul>" |
89 }, |
86 }, |
90 //Make sure "Direct Know Subclasses" omits type parameters |
87 //Make sure "Direct Know Subclasses" omits type parameters |
91 {BUG_ID + "/pkg/Parent.html", |
88 { "pkg/Parent.html", |
92 "<dl>\n" + |
89 "<dl>\n" + |
93 "<dt>Direct Known Subclasses:</dt>\n" + |
90 "<dt>Direct Known Subclasses:</dt>\n" + |
94 "<dd><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child" + |
91 "<dd><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child" + |
95 "</a></dd>\n" + |
92 "</a></dd>\n" + |
96 "</dl>" |
93 "</dl>" |
97 }, |
94 }, |
98 //Make sure "Specified By" has substituted type parameters. |
95 //Make sure "Specified By" has substituted type parameters. |
99 {BUG_ID + "/pkg/Child.html", |
96 { "pkg/Child.html", |
100 "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n" + |
97 "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n" + |
101 "<dd><code><a href=\"../pkg/Interface.html#method--\">method</a>" + |
98 "<dd><code><a href=\"../pkg/Interface.html#method--\">method</a>" + |
102 "</code> in interface <code>" + |
99 "</code> in interface <code>" + |
103 "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" + |
100 "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" + |
104 "Interface</a><<a href=\"../pkg/Child.html\" title=\"type parameter in Child\">" + |
101 "Interface</a><<a href=\"../pkg/Child.html\" title=\"type parameter in Child\">" + |
105 "T</a>></code></dd>" |
102 "T</a>></code></dd>" |
106 }, |
103 }, |
107 //Make sure "Overrides" has substituted type parameters. |
104 //Make sure "Overrides" has substituted type parameters. |
108 {BUG_ID + "/pkg/Child.html", |
105 { "pkg/Child.html", |
109 "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" + |
106 "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" + |
110 "<dd><code><a href=\"../pkg/Parent.html#method--\">method</a>" + |
107 "<dd><code><a href=\"../pkg/Parent.html#method--\">method</a>" + |
111 "</code> in class <code><a href=\"../pkg/Parent.html\" " + |
108 "</code> in class <code><a href=\"../pkg/Parent.html\" " + |
112 "title=\"class in pkg\">Parent</a><<a href=\"../pkg/Child.html\" " + |
109 "title=\"class in pkg\">Parent</a><<a href=\"../pkg/Child.html\" " + |
113 "title=\"type parameter in Child\">T</a>></code></dd>" |
110 "title=\"type parameter in Child\">T</a>></code></dd>" |
114 }, |
111 }, |
115 }; |
112 }; |
116 private static final String[][] NEGATED_TEST = { |
113 private static final String[][] NEGATED_TEST = { |
117 {BUG_ID + "/pkg/Interface.html", |
114 { "pkg/Interface.html", |
118 "public int method()"}, |
115 "public int method()"}, |
119 {BUG_ID + "/pkg/Interface.html", |
116 { "pkg/Interface.html", |
120 "public static final int field"}, |
117 "public static final int field"}, |
121 }; |
118 }; |
122 |
119 |
123 /** |
120 /** |
124 * The entry point of the test. |
121 * The entry point of the test. |