test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java

changeset 182
47a62d8d98b4
parent 1
9a66ca7c79fa
child 233
5240b1120530
equal deleted inserted replaced
178:4efd44aa85ff 182:47a62d8d98b4
83 // private class does not show up in tree 83 // private class does not show up in tree
84 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 84 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
85 "<PRE>" + NL + 85 "<PRE>" + NL +
86 "java.lang.Object" + NL + 86 "java.lang.Object" + NL +
87 " <IMG SRC=\"../resources/inherit.gif\" " + 87 " <IMG SRC=\"../resources/inherit.gif\" " +
88 "ALT=\"extended by \"><B>pkg.PublicChild</B>" + NL + 88 "ALT=\"extended by \"><STRONG>pkg.PublicChild</STRONG>" + NL +
89 "</PRE>" 89 "</PRE>"
90 }, 90 },
91 91
92 // Method is documented as though it is declared in the inheriting method. 92 // Method is documented as though it is declared in the inheriting method.
93 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 93 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
94 "public void <B>methodInheritedFromParent</B>(int&nbsp;p1)" 94 "public void <STRONG>methodInheritedFromParent</STRONG>(int&nbsp;p1)"
95 }, 95 },
96 96
97 //Make sure implemented interfaces from private superclass are inherited 97 //Make sure implemented interfaces from private superclass are inherited
98 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", 98 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
99 "<B>All Known Implementing Classes:</B> <DD><A HREF=\"../pkg/PublicChild.html\" " + 99 "<STRONG>All Known Implementing Classes:</STRONG> <DD><A HREF=\"../pkg/PublicChild.html\" " +
100 "title=\"class in pkg\">PublicChild</A>"}, 100 "title=\"class in pkg\">PublicChild</A>"},
101 101
102 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 102 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
103 "<B>All Implemented Interfaces:</B> <DD><A HREF=\"../pkg/PublicInterface.html\" " + 103 "<STRONG>All Implemented Interfaces:</STRONG> <DD><A HREF=\"../pkg/PublicInterface.html\" " +
104 "title=\"interface in pkg\">PublicInterface</A>"}, 104 "title=\"interface in pkg\">PublicInterface</A>"},
105 105
106 //Generic interface method test. 106 //Generic interface method test.
107 {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html", 107 {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html",
108 "This comment should get copied to the implementing class"}, 108 "This comment should get copied to the implementing class"},
109 }; 109 };
110 private static final String[][] NEGATED_TEST1 = { 110 private static final String[][] NEGATED_TEST1 = {
111 // Should not document that a method overrides method from private class. 111 // Should not document that a method overrides method from private class.
112 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 112 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
113 "<B>Overrides:</B>"}, 113 "<STRONG>Overrides:</STRONG>"},
114 // Should not document that a method specified by private interface. 114 // Should not document that a method specified by private interface.
115 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 115 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
116 "<B>Specified by:</B>"}, 116 "<STRONG>Specified by:</STRONG>"},
117 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", 117 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
118 "<B>Specified by:</B>"}, 118 "<STRONG>Specified by:</STRONG>"},
119 // Should not mention that any documentation was copied. 119 // Should not mention that any documentation was copied.
120 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 120 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
121 "Description copied from"}, 121 "Description copied from"},
122 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", 122 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
123 "Description copied from"}, 123 "Description copied from"},
135 "PrivateInterface"}, 135 "PrivateInterface"},
136 136
137 //Do not inherit private interface method with generic parameters. 137 //Do not inherit private interface method with generic parameters.
138 //This method has been implemented. 138 //This method has been implemented.
139 {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html", 139 {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html",
140 "<B><A HREF=\"../pkg2/I.html#hello(T)\">hello</A></B>"}, 140 "<STRONG><A HREF=\"../pkg2/I.html#hello(T)\">hello</A></STRONG>"},
141 }; 141 };
142 142
143 // Test output when -private flag is used. 143 // Test output when -private flag is used.
144 private static final String[][] TEST2 = { 144 private static final String[][] TEST2 = {
145 // Field inheritence from non-public superclass. 145 // Field inheritence from non-public superclass.
172 "<A HREF=\"../pkg/PrivateParent.html#methodInheritedFromParent(int)\">" + 172 "<A HREF=\"../pkg/PrivateParent.html#methodInheritedFromParent(int)\">" +
173 "methodInheritedFromParent</A>" 173 "methodInheritedFromParent</A>"
174 }, 174 },
175 // Should document that a method overrides method from private class. 175 // Should document that a method overrides method from private class.
176 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 176 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
177 "<B>Overrides:</B><DD><CODE>" + 177 "<STRONG>Overrides:</STRONG><DD><CODE>" +
178 "<A HREF=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[], int, T, V, java.util.List)\">" + 178 "<A HREF=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[], int, T, V, java.util.List)\">" +
179 "methodOverridenFromParent</A></CODE> in class <CODE>" + 179 "methodOverridenFromParent</A></CODE> in class <CODE>" +
180 "<A HREF=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" + 180 "<A HREF=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
181 "PrivateParent</A></CODE></DL>"}, 181 "PrivateParent</A></CODE></DL>"},
182 // Should document that a method is specified by private interface. 182 // Should document that a method is specified by private interface.
183 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 183 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
184 "<B>Specified by:</B><DD><CODE>" + 184 "<STRONG>Specified by:</STRONG><DD><CODE>" +
185 "<A HREF=\"../pkg/PrivateInterface.html#methodInterface(int)\">" + 185 "<A HREF=\"../pkg/PrivateInterface.html#methodInterface(int)\">" +
186 "methodInterface</A></CODE> in interface <CODE>" + 186 "methodInterface</A></CODE> in interface <CODE>" +
187 "<A HREF=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" + 187 "<A HREF=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
188 "PrivateInterface</A></CODE></DL>" + NL + "</DD>"}, 188 "PrivateInterface</A></CODE></DL>" + NL + "</DD>"},
189 // Method inheritence from non-public superinterface. 189 // Method inheritence from non-public superinterface.
207 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", 207 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
208 "All Superinterfaces"}, 208 "All Superinterfaces"},
209 209
210 //Make sure implemented interfaces from private superclass are inherited 210 //Make sure implemented interfaces from private superclass are inherited
211 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", 211 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
212 "<B>All Known Implementing Classes:</B> <DD><A HREF=\"../pkg/PrivateParent.html\" " + 212 "<STRONG>All Known Implementing Classes:</STRONG> <DD><A HREF=\"../pkg/PrivateParent.html\" " +
213 "title=\"class in pkg\">PrivateParent</A>, " + 213 "title=\"class in pkg\">PrivateParent</A>, " +
214 "<A HREF=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</A>"}, 214 "<A HREF=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</A>"},
215 215
216 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 216 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
217 "<B>All Implemented Interfaces:</B> <DD><A HREF=\"../pkg/PrivateInterface.html\" " + 217 "<STRONG>All Implemented Interfaces:</STRONG> <DD><A HREF=\"../pkg/PrivateInterface.html\" " +
218 "title=\"interface in pkg\">PrivateInterface</A>, " + 218 "title=\"interface in pkg\">PrivateInterface</A>, " +
219 "<A HREF=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">" + 219 "<A HREF=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">" +
220 "PublicInterface</A>"}, 220 "PublicInterface</A>"},
221 221
222 //Since private flag is used, we can document that private interface method 222 //Since private flag is used, we can document that private interface method
223 //with generic parameters has been implemented. 223 //with generic parameters has been implemented.
224 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html", 224 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
225 "<B>Description copied from interface: " + 225 "<STRONG>Description copied from interface: " +
226 "<CODE><A HREF=\"../pkg2/I.html#hello(T)\">I</A></CODE></B>"}, 226 "<CODE><A HREF=\"../pkg2/I.html#hello(T)\">I</A></CODE></STRONG>"},
227 227
228 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html", 228 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
229 "<B>Specified by:</B><DD><CODE><A HREF=\"../pkg2/I.html#hello(T)\">" + 229 "<STRONG>Specified by:</STRONG><DD><CODE><A HREF=\"../pkg2/I.html#hello(T)\">" +
230 "hello</A></CODE> in interface <CODE><A HREF=\"../pkg2/I.html\" " + 230 "hello</A></CODE> in interface <CODE><A HREF=\"../pkg2/I.html\" " +
231 "title=\"interface in pkg2\">I</A>"}, 231 "title=\"interface in pkg2\">I</A>"},
232 }; 232 };
233 private static final String[][] NEGATED_TEST2 = NO_TEST; 233 private static final String[][] NEGATED_TEST2 = NO_TEST;
234 234

mercurial