1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,583 @@ 1.4 +/* 1.5 + * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. 1.11 + * 1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.15 + * version 2 for more details (a copy is included in the LICENSE file that 1.16 + * accompanied this code). 1.17 + * 1.18 + * You should have received a copy of the GNU General Public License version 1.19 + * 2 along with this work; if not, write to the Free Software Foundation, 1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.21 + * 1.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.23 + * CA 95054 USA or visit www.sun.com if you need additional information or 1.24 + * have any questions. 1.25 + */ 1.26 + 1.27 +/* 1.28 + * @test 1.29 + * @bug 4789689 4905985 4927164 4827184 4993906 5004549 1.30 + * @summary Run Javadoc on a set of source files that demonstrate new 1.31 + * language features. Check the output to ensure that the new 1.32 + * language features are properly documented. 1.33 + * @author jamieh 1.34 + * @library ../lib/ 1.35 + * @build JavadocTester 1.36 + * @build TestNewLanguageFeatures 1.37 + * @run main TestNewLanguageFeatures 1.38 + */ 1.39 + 1.40 +public class TestNewLanguageFeatures extends JavadocTester { 1.41 + 1.42 + //Test information. 1.43 + private static final String BUG_ID = "4789689-4905985-4927164-4827184-4993906"; 1.44 + 1.45 + //Javadoc arguments. 1.46 + private static final String[] ARGS = new String[] { 1.47 + "-d", BUG_ID, "-use", "-source", "1.5", "-sourcepath", SRC_DIR, "pkg", "pkg1", "pkg2" 1.48 + }; 1.49 + 1.50 + //Input for string search tests. 1.51 + private static final String[][] TEST = 1.52 + { 1.53 + //================================= 1.54 + // ENUM TESTING 1.55 + //================================= 1.56 + //Make sure enum header is correct. 1.57 + {BUG_ID + FS + "pkg" + FS + "Coin.html", "Enum Coin</H2>"}, 1.58 + //Make sure enum signature is correct. 1.59 + {BUG_ID + FS + "pkg" + FS + "Coin.html", "public enum "+ 1.60 + "<B>Coin</B><DT>extends java.lang.Enum<" + 1.61 + "<A HREF=\"../pkg/Coin.html\" title=\"enum in pkg\">Coin</A>>" 1.62 + }, 1.63 + //Check for enum constant section 1.64 + {BUG_ID + FS + "pkg" + FS + "Coin.html", "<B>Enum Constant Summary</B>"}, 1.65 + //Detail for enum constant 1.66 + {BUG_ID + FS + "pkg" + FS + "Coin.html", 1.67 + "<B><A HREF=\"../pkg/Coin.html#Dime\">Dime</A></B>"}, 1.68 + //Automatically insert documentation for values() and valueOf(). 1.69 + {BUG_ID + FS + "pkg" + FS + "Coin.html", 1.70 + "Returns an array containing the constants of this enum type,"}, 1.71 + {BUG_ID + FS + "pkg" + FS + "Coin.html", 1.72 + "Returns the enum constant of this type with the specified name"}, 1.73 + {BUG_ID + FS + "pkg" + FS + "Coin.html", "for (Coin c : Coin.values())"}, 1.74 + {BUG_ID + FS + "pkg" + FS + "Coin.html", "Overloaded valueOf() method has correct documentation."}, 1.75 + {BUG_ID + FS + "pkg" + FS + "Coin.html", "Overloaded values method has correct documentation."}, 1.76 + 1.77 + //================================= 1.78 + // TYPE PARAMETER TESTING 1.79 + //================================= 1.80 + //Make sure the header is correct. 1.81 + {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 1.82 + "Class TypeParameters<E></H2>"}, 1.83 + //Check class type parameters section. 1.84 + {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 1.85 + "<DT><B>Type Parameters:</B><DD><CODE>E</CODE> - " + 1.86 + "the type parameter for this class."}, 1.87 + //Type parameters in @see/@link 1.88 + {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 1.89 + "<DT><B>See Also:</B><DD><A HREF=\"../pkg/TypeParameters.html\" " + 1.90 + "title=\"class in pkg\"><CODE>TypeParameters</CODE></A></DL>"}, 1.91 + //Method that uses class type parameter. 1.92 + {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 1.93 + "(<A HREF=\"../pkg/TypeParameters.html\" title=\"type " + 1.94 + "parameter in TypeParameters\">E</A> param)"}, 1.95 + //Method type parameter section. 1.96 + {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 1.97 + "<B>Type Parameters:</B><DD><CODE>T</CODE> - This is the first " + 1.98 + "type parameter.<DD><CODE>V</CODE> - This is the second type " + 1.99 + "parameter."}, 1.100 + //Signature of method with type parameters 1.101 + {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 1.102 + "public <T extends java.util.List,V> " + 1.103 + "java.lang.String[] <B>methodThatHasTypeParameters</B>"}, 1.104 + //Wildcard testing. 1.105 + {BUG_ID + FS + "pkg" + FS + "Wildcards.html", 1.106 + "<A HREF=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + 1.107 + "TypeParameters</A><? super java.lang.String> a"}, 1.108 + {BUG_ID + FS + "pkg" + FS + "Wildcards.html", 1.109 + "<A HREF=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + 1.110 + "TypeParameters</A><? extends java.lang.StringBuffer> b"}, 1.111 + {BUG_ID + FS + "pkg" + FS + "Wildcards.html", 1.112 + "<A HREF=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + 1.113 + "TypeParameters</A> c"}, 1.114 + //Bad type parameter warnings. 1.115 + {WARNING_OUTPUT, "warning - @param argument " + 1.116 + "\"<BadClassTypeParam>\" is not a type parameter name."}, 1.117 + {WARNING_OUTPUT, "warning - @param argument " + 1.118 + "\"<BadMethodTypeParam>\" is not a type parameter name."}, 1.119 + 1.120 + //Signature of subclass that has type parameters. 1.121 + {BUG_ID + FS + "pkg" + FS + "TypeParameterSubClass.html", 1.122 + "public class <B>TypeParameterSubClass<T extends java.lang.String>" + 1.123 + "</B><DT>extends <A HREF=\"../pkg/TypeParameterSuperClass.html\" " + 1.124 + "title=\"class in pkg\">TypeParameterSuperClass</A><T>"}, 1.125 + 1.126 + //Interface generic parameter substitution 1.127 + //Signature of subclass that has type parameters. 1.128 + {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 1.129 + "<B>All Implemented Interfaces:</B> <DD><A HREF=\"../pkg/SubInterface.html\" title=\"interface in pkg\">SubInterface</A><E>, <A HREF=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">SuperInterface</A><E></DD>"}, 1.130 + {BUG_ID + FS + "pkg" + FS + "SuperInterface.html", 1.131 + "<B>All Known Subinterfaces:</B> <DD><A HREF=\"../pkg/SubInterface.html\" title=\"interface in pkg\">SubInterface</A><V></DD>"}, 1.132 + {BUG_ID + FS + "pkg" + FS + "SubInterface.html", 1.133 + "<B>All Superinterfaces:</B> <DD><A HREF=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">SuperInterface</A><V></DD>"}, 1.134 + 1.135 + //================================= 1.136 + // VAR ARG TESTING 1.137 + //================================= 1.138 + {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int... i)"}, 1.139 + {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[][]... i)"}, 1.140 + {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[]...)"}, 1.141 + {BUG_ID + FS + "pkg" + FS + "VarArgs.html", 1.142 + "<A HREF=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + 1.143 + "TypeParameters</A>... t"}, 1.144 + 1.145 + //================================= 1.146 + // ANNOTATION TYPE TESTING 1.147 + //================================= 1.148 + //Make sure the summary links are correct. 1.149 + {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 1.150 + "SUMMARY: <A HREF=\"#annotation_type_required_element_summary\">" + 1.151 + "REQUIRED</A> | <A HREF=\"#annotation_type_optional_element_summary\">" + 1.152 + "OPTIONAL</A>"}, 1.153 + //Make sure the detail links are correct. 1.154 + {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 1.155 + "DETAIL: <A HREF=\"#annotation_type_element_detail\">ELEMENT</A>"}, 1.156 + //Make sure the heading is correct. 1.157 + {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 1.158 + "Annotation Type AnnotationType</H2>"}, 1.159 + //Make sure the signature is correct. 1.160 + {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 1.161 + "public @interface <B>AnnotationType</B>"}, 1.162 + //Make sure member summary headings are correct. 1.163 + {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 1.164 + "<B>Required Element Summary</B>"}, 1.165 + {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 1.166 + "<B>Optional Element Summary</B>"}, 1.167 + //Make sure element detail heading is correct 1.168 + {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 1.169 + "Element Detail"}, 1.170 + //Make sure default annotation type value is printed when necessary. 1.171 + {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 1.172 + "<B>Default:</B><DD>\"unknown\"</DD>"}, 1.173 + 1.174 + //================================= 1.175 + // ANNOTATION TYPE USAGE TESTING 1.176 + //================================= 1.177 + 1.178 + //PACKAGE 1.179 + {BUG_ID + FS + "pkg" + FS + "package-summary.html", 1.180 + "<A HREF=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</A>(<A HREF=\"../pkg/AnnotationType.html#optional()\">optional</A>=\"Package Annotation\"," + NL + 1.181 + " <A HREF=\"../pkg/AnnotationType.html#required()\">required</A>=1994)"}, 1.182 + 1.183 + //CLASS 1.184 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.185 + "<FONT SIZE=\"-1\">" + 1.186 + "<A HREF=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</A>(<A HREF=\"../pkg/AnnotationType.html#optional()\">optional</A>=\"Class Annotation\","+NL + 1.187 + " <A HREF=\"../pkg/AnnotationType.html#required()\">required</A>=1994)"+NL + 1.188 + "</FONT>public class <B>AnnotationTypeUsage</B><DT>extends java.lang.Object</DL>"}, 1.189 + 1.190 + //FIELD 1.191 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.192 + "<FONT SIZE=\"-1\">" + 1.193 + "<A HREF=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</A>(<A HREF=\"../pkg/AnnotationType.html#optional()\">optional</A>=\"Field Annotation\","+NL + 1.194 + " <A HREF=\"../pkg/AnnotationType.html#required()\">required</A>=1994)"+NL + 1.195 + "</FONT>public int <B>field</B>"}, 1.196 + 1.197 + //CONSTRUCTOR 1.198 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.199 + "<FONT SIZE=\"-1\">" + 1.200 + "<A HREF=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</A>(<A HREF=\"../pkg/AnnotationType.html#optional()\">optional</A>=\"Constructor Annotation\","+NL + 1.201 + " <A HREF=\"../pkg/AnnotationType.html#required()\">required</A>=1994)"+NL + 1.202 + "</FONT>public <B>AnnotationTypeUsage</B>()"}, 1.203 + 1.204 + //METHOD 1.205 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.206 + "<FONT SIZE=\"-1\">" + 1.207 + "<A HREF=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</A>(<A HREF=\"../pkg/AnnotationType.html#optional()\">optional</A>=\"Method Annotation\","+NL + 1.208 + " <A HREF=\"../pkg/AnnotationType.html#required()\">required</A>=1994)"+NL + 1.209 + "</FONT>public void <B>method</B>()"}, 1.210 + 1.211 + //METHOD PARAMS 1.212 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.213 + "<PRE>" + NL + 1.214 + "public void <B>methodWithParams</B>(<FONT SIZE=\"-1\"><A HREF=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</A>(<A HREF=\"../pkg/AnnotationType.html#optional()\">optional</A>=\"Parameter Annotation\",<A HREF=\"../pkg/AnnotationType.html#required()\">required</A>=1994)</FONT>" + NL + 1.215 + " int documented," + NL + 1.216 + " int undocmented)</PRE>"}, 1.217 + 1.218 + //CONSTRUCTOR PARAMS 1.219 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.220 + "<PRE>" + NL + 1.221 + "public <B>AnnotationTypeUsage</B>(<FONT SIZE=\"-1\"><A HREF=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</A>(<A HREF=\"../pkg/AnnotationType.html#optional()\">optional</A>=\"Constructor Param Annotation\",<A HREF=\"../pkg/AnnotationType.html#required()\">required</A>=1994)</FONT>" + NL + 1.222 + " int documented," + NL + 1.223 + " int undocmented)</PRE>"}, 1.224 + 1.225 + //================================= 1.226 + // ANNOTATION TYPE USAGE TESTING (All Different Types). 1.227 + //================================= 1.228 + 1.229 + //Integer 1.230 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.231 + "<A HREF=\"../pkg1/A.html#d()\">d</A>=3.14,"}, 1.232 + 1.233 + //Double 1.234 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.235 + "<A HREF=\"../pkg1/A.html#d()\">d</A>=3.14,"}, 1.236 + 1.237 + //Boolean 1.238 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.239 + "<A HREF=\"../pkg1/A.html#b()\">b</A>=true,"}, 1.240 + 1.241 + //String 1.242 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.243 + "<A HREF=\"../pkg1/A.html#s()\">s</A>=\"sigh\","}, 1.244 + 1.245 + //Class 1.246 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.247 + "<A HREF=\"../pkg1/A.html#c()\">c</A>=<A HREF=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</A>,"}, 1.248 + 1.249 + //Bounded Class 1.250 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.251 + "<A HREF=\"../pkg1/A.html#w()\">w</A>=<A HREF=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</A>,"}, 1.252 + 1.253 + //Enum 1.254 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.255 + "<A HREF=\"../pkg1/A.html#e()\">e</A>=<A HREF=\"../pkg/Coin.html#Penny\">Penny</A>,"}, 1.256 + 1.257 + //Annotation Type 1.258 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.259 + "<A HREF=\"../pkg1/A.html#a()\">a</A>=<A HREF=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</A>(<A HREF=\"../pkg/AnnotationType.html#optional()\">optional</A>=\"foo\",<A HREF=\"../pkg/AnnotationType.html#required()\">required</A>=1994),"}, 1.260 + 1.261 + //String Array 1.262 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.263 + "<A HREF=\"../pkg1/A.html#sa()\">sa</A>={\"up\",\"down\"},"}, 1.264 + 1.265 + //Primitive 1.266 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.267 + "<A HREF=\"../pkg1/A.html#primitiveClassTest()\">primitiveClassTest</A>=boolean.class,"}, 1.268 + 1.269 + //XXX: Add array test case after this if fixed: 1.270 + //5020899: Incorrect internal representation of class-valued annotation elements 1.271 + 1.272 + //Make sure that annotations are surrounded by <pre> and </pre> 1.273 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.274 + "<PRE><FONT SIZE=\"-1\"><A HREF=\"../pkg1/A.html\" title=\"annotation in pkg1\">@A</A>"}, 1.275 + {BUG_ID + FS + "pkg1" + FS + "B.html", 1.276 + "</FONT>public interface <B>B</B></DL>" + NL + 1.277 + "</PRE>"}, 1.278 + 1.279 + 1.280 + //============================================================== 1.281 + // Handle multiple bounds. 1.282 + //============================================================== 1.283 + {BUG_ID + FS + "pkg" + FS + "MultiTypeParameters.html", 1.284 + "public <T extends java.lang.Number & java.lang.Runnable> T <B>foo</B>(T t)"}, 1.285 + 1.286 + //============================================================== 1.287 + // Test Class-Use Documenation for Type Parameters. 1.288 + //============================================================== 1.289 + 1.290 + //ClassUseTest1: <T extends Foo & Foo2> 1.291 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", 1.292 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Classes in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</A></FONT></TH>" 1.293 + }, 1.294 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", 1.295 + "<TD><CODE><B><A HREF=\"../../pkg2/ClassUseTest1.html\" title=\"class in pkg2\">ClassUseTest1<T extends Foo & Foo2></A></B></CODE>" 1.296 + }, 1.297 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", 1.298 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</A></FONT></TH>" 1.299 + }, 1.300 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", 1.301 + "<TD><CODE><B>ClassUseTest1.</B><B><A HREF=\"../../pkg2/ClassUseTest1.html#method(T)\">method</A></B>(T t)</CODE>" 1.302 + }, 1.303 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", 1.304 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Fields in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</A></FONT></TH>" 1.305 + }, 1.306 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", 1.307 + "<A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A><<A HREF=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</A>></CODE></FONT></TD>" 1.308 + }, 1.309 + 1.310 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.311 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Fields in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> declared as <A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A></FONT></TH>" 1.312 + }, 1.313 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.314 + "<A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A><<A HREF=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</A>></CODE></FONT></TD>" 1.315 + }, 1.316 + 1.317 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html", 1.318 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Classes in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">Foo2</A></FONT></TH>" 1.319 + }, 1.320 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html", 1.321 + "<TD><CODE><B><A HREF=\"../../pkg2/ClassUseTest1.html\" title=\"class in pkg2\">ClassUseTest1<T extends Foo & Foo2></A></B></CODE>" 1.322 + }, 1.323 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html", 1.324 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">Foo2</A></FONT></TH>" 1.325 + }, 1.326 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html", 1.327 + "<TD><CODE><B>ClassUseTest1.</B><B><A HREF=\"../../pkg2/ClassUseTest1.html#method(T)\">method</A></B>(T t)</CODE>" 1.328 + }, 1.329 + 1.330 + //ClassUseTest2: <T extends ParamTest<Foo3>> 1.331 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.332 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Classes in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A></FONT></TH>" 1.333 + }, 1.334 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.335 + "<TD><CODE><B><A HREF=\"../../pkg2/ClassUseTest2.html\" title=\"class in pkg2\">ClassUseTest2<T extends ParamTest<<A HREF=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3</A>>></A></B></CODE>" 1.336 + }, 1.337 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.338 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A></FONT></TH>" 1.339 + }, 1.340 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.341 + "<TD><CODE><B>ClassUseTest2.</B><B><A HREF=\"../../pkg2/ClassUseTest2.html#method(T)\">method</A></B>(T t)</CODE>" 1.342 + }, 1.343 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.344 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Fields in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> declared as <A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A></FONT></TH>" 1.345 + }, 1.346 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.347 + "<A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A><<A HREF=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</A>></CODE></FONT></TD>" 1.348 + }, 1.349 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.350 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A></FONT></TH>" 1.351 + }, 1.352 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 1.353 + "<T extends <A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A><<A HREF=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3</A>>>" 1.354 + }, 1.355 + 1.356 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", 1.357 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Classes in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3</A></FONT></TH>" 1.358 + }, 1.359 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", 1.360 + "<TD><CODE><B><A HREF=\"../../pkg2/ClassUseTest2.html\" title=\"class in pkg2\">ClassUseTest2<T extends ParamTest<<A HREF=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3</A>>></A></B></CODE>" 1.361 + }, 1.362 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", 1.363 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3</A></FONT></TH>" 1.364 + }, 1.365 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", 1.366 + "<TD><CODE><B>ClassUseTest2.</B><B><A HREF=\"../../pkg2/ClassUseTest2.html#method(T)\">method</A></B>(T t)</CODE>" 1.367 + }, 1.368 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", 1.369 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> that return types with arguments of type <A HREF=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3</A></FONT></TH>" 1.370 + }, 1.371 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", 1.372 + "<T extends <A HREF=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</A><<A HREF=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3</A>>>" 1.373 + }, 1.374 + 1.375 + //ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>> 1.376 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", 1.377 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Classes in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">ParamTest2</A></FONT></TH>" 1.378 + }, 1.379 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", 1.380 + "<TD><CODE><B><A HREF=\"../../pkg2/ClassUseTest3.html\" title=\"class in pkg2\">ClassUseTest3<T extends ParamTest2<java.util.List<? extends Foo4>>></A></B></CODE>" 1.381 + }, 1.382 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", 1.383 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">ParamTest2</A></FONT></TH>" 1.384 + }, 1.385 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", 1.386 + "<TD><CODE><B>ClassUseTest3.</B><B><A HREF=\"../../pkg2/ClassUseTest3.html#method(T)\">method</A></B>(T t)</CODE>" 1.387 + }, 1.388 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", 1.389 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">ParamTest2</A></FONT></TH>" 1.390 + }, 1.391 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", 1.392 + "<T extends <A HREF=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">ParamTest2</A><java.util.List<? extends <A HREF=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</A>>>>" 1.393 + }, 1.394 + 1.395 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 1.396 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Classes in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</A></FONT></TH>" 1.397 + }, 1.398 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 1.399 + "<TD><CODE><B><A HREF=\"../../pkg2/ClassUseTest3.html\" title=\"class in pkg2\">ClassUseTest3<T extends ParamTest2<java.util.List<? extends Foo4>>></A></B></CODE>" 1.400 + }, 1.401 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 1.402 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type parameters of type <A HREF=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</A></FONT></TH>" 1.403 + }, 1.404 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 1.405 + "<TD><CODE><B>ClassUseTest3.</B><B><A HREF=\"../../pkg2/ClassUseTest3.html#method(T)\">method</A></B>(T t)</CODE>" 1.406 + }, 1.407 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 1.408 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Methods in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> that return types with arguments of type <A HREF=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</A></FONT></TH>" 1.409 + }, 1.410 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 1.411 + "<T extends <A HREF=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">ParamTest2</A><java.util.List<? extends <A HREF=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</A>>>>" 1.412 + }, 1.413 + 1.414 + //Type parameters in constructor and method args 1.415 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 1.416 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Method parameters in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type arguments of type <A HREF=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</A></FONT></TH>" + NL + 1.417 + "</TR>" + NL + 1.418 + "<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">" + NL + 1.419 + "<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">" + NL + 1.420 + "<CODE> void</CODE></FONT></TD>" + NL + 1.421 + "<TD><CODE><B>ClassUseTest3.</B><B><A HREF=\"../../pkg2/ClassUseTest3.html#method(java.util.Set)\">method</A></B>(java.util.Set<<A HREF=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</A>> p)</CODE>" 1.422 + }, 1.423 + {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 1.424 + "<TH ALIGN=\"left\" COLSPAN=\"2\">Constructor parameters in <A HREF=\"../../pkg2/package-summary.html\">pkg2</A> with type arguments of type <A HREF=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</A></FONT></TH>" + NL + 1.425 + "</TR>" + NL + 1.426 + "<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">" + NL + 1.427 + "<TD><CODE><B><A HREF=\"../../pkg2/ClassUseTest3.html#ClassUseTest3(java.util.Set)\">ClassUseTest3</A></B>(java.util.Set<<A HREF=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</A>> p)</CODE>" 1.428 + }, 1.429 + 1.430 + //================================= 1.431 + // Annotatation Type Usage 1.432 + //================================= 1.433 + {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", 1.434 + "<FONT SIZE=\"+2\">" + NL + 1.435 + "Packages with annotations of type <A HREF=\"../../pkg/AnnotationType.html\" title=\"annotation in pkg\">AnnotationType</A></FONT></TH>" + NL + 1.436 + "</TR>" + NL + 1.437 + "<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">" + NL + 1.438 + "<TD><A HREF=\"../../pkg/package-summary.html\"><B>pkg</B></A></TD>" 1.439 + }, 1.440 + 1.441 + {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", 1.442 + "Classes in <A HREF=\"../../pkg/package-summary.html\">pkg</A> with annotations of type <A HREF=\"../../pkg/AnnotationType.html\" title=\"annotation in pkg\">AnnotationType</A></FONT></TH>" + NL + 1.443 + "</TR>" + NL + 1.444 + "<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">" + NL + 1.445 + "<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">" + NL + 1.446 + "<CODE> class</CODE></FONT></TD>" + NL + 1.447 + "<TD><CODE><B><A HREF=\"../../pkg/AnnotationTypeUsage.html\" title=\"class in pkg\">AnnotationTypeUsage</A></B></CODE>" 1.448 + }, 1.449 + 1.450 + {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", 1.451 + "Fields in <A HREF=\"../../pkg/package-summary.html\">pkg</A> with annotations of type <A HREF=\"../../pkg/AnnotationType.html\" title=\"annotation in pkg\">AnnotationType</A></FONT></TH>" + NL + 1.452 + "</TR>" + NL + 1.453 + "<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">" + NL + 1.454 + "<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">" + NL + 1.455 + "<CODE> int</CODE></FONT></TD>" + NL + 1.456 + "<TD><CODE><B>AnnotationTypeUsage.</B><B><A HREF=\"../../pkg/AnnotationTypeUsage.html#field\">field</A></B></CODE>" 1.457 + }, 1.458 + 1.459 + {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", 1.460 + "Methods in <A HREF=\"../../pkg/package-summary.html\">pkg</A> with annotations of type <A HREF=\"../../pkg/AnnotationType.html\" title=\"annotation in pkg\">AnnotationType</A></FONT></TH>" + NL + 1.461 + "</TR>" + NL + 1.462 + "<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">" + NL + 1.463 + "<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">" + NL + 1.464 + "<CODE> void</CODE></FONT></TD>" + NL + 1.465 + "<TD><CODE><B>AnnotationTypeUsage.</B><B><A HREF=\"../../pkg/AnnotationTypeUsage.html#method()\">method</A></B>()</CODE>" 1.466 + }, 1.467 + 1.468 + {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", 1.469 + "Method parameters in <A HREF=\"../../pkg/package-summary.html\">pkg</A> with annotations of type <A HREF=\"../../pkg/AnnotationType.html\" title=\"annotation in pkg\">AnnotationType</A></FONT></TH>" + NL + 1.470 + "</TR>" + NL + 1.471 + "<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">" + NL + 1.472 + "<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">" + NL + 1.473 + "<CODE> void</CODE></FONT></TD>" + NL + 1.474 + "<TD><CODE><B>AnnotationTypeUsage.</B><B><A HREF=\"../../pkg/AnnotationTypeUsage.html#methodWithParams(int, int)\">methodWithParams</A></B>(int documented," + NL + 1.475 + " int undocmented)</CODE>" 1.476 + }, 1.477 + 1.478 + {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", 1.479 + "Constructors in <A HREF=\"../../pkg/package-summary.html\">pkg</A> with annotations of type <A HREF=\"../../pkg/AnnotationType.html\" title=\"annotation in pkg\">AnnotationType</A></FONT></TH>" + NL + 1.480 + "</TR>" + NL + 1.481 + "<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">" + NL + 1.482 + "<TD><CODE><B><A HREF=\"../../pkg/AnnotationTypeUsage.html#AnnotationTypeUsage()\">AnnotationTypeUsage</A></B>()</CODE>" 1.483 + }, 1.484 + 1.485 + {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", 1.486 + "Constructor parameters in <A HREF=\"../../pkg/package-summary.html\">pkg</A> with annotations of type <A HREF=\"../../pkg/AnnotationType.html\" title=\"annotation in pkg\">AnnotationType</A></FONT></TH>" + NL + 1.487 + "</TR>" + NL + 1.488 + "<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">" + NL + 1.489 + "<TD><CODE><B><A HREF=\"../../pkg/AnnotationTypeUsage.html#AnnotationTypeUsage(int, int)\">AnnotationTypeUsage</A></B>(int documented," + NL + 1.490 + " int undocmented)</CODE>" 1.491 + }, 1.492 + 1.493 + //================================= 1.494 + // TYPE PARAMETER IN INDEX 1.495 + //================================= 1.496 + {BUG_ID + FS + "index-all.html", 1.497 + "<A HREF=\"./pkg2/Foo.html#method(java.util.Vector)\"><B>method(Vector<Object>)</B></A>" 1.498 + }, 1.499 + //================================= 1.500 + // TYPE PARAMETER IN INDEX 1.501 + //================================= 1.502 + {BUG_ID + FS + "index-all.html", 1.503 + "<A HREF=\"./pkg2/Foo.html#method(java.util.Vector)\"><B>method(Vector<Object>)</B></A>" 1.504 + }, 1.505 + }; 1.506 + private static final String[][] NEGATED_TEST = { 1.507 + //================================= 1.508 + // ENUM TESTING 1.509 + //================================= 1.510 + //NO constructor section 1.511 + {BUG_ID + FS + "pkg" + FS + "Coin.html", "<B>Constructor Summary</B>"}, 1.512 + //================================= 1.513 + // TYPE PARAMETER TESTING 1.514 + //================================= 1.515 + //No type parameters in class frame. 1.516 + {BUG_ID + FS + "allclasses-frame.html", 1.517 + "<A HREF=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + 1.518 + "TypeParameters</A><<A HREF=\"../pkg/TypeParameters.html\" " + 1.519 + "title=\"type parameter in TypeParameters\">E</A>>" 1.520 + }, 1.521 + 1.522 + //============================================================== 1.523 + // ANNOTATION TYPE USAGE TESTING (When @Documented is omitted) 1.524 + //=============================================================== 1.525 + 1.526 + //CLASS 1.527 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.528 + "<FONT SIZE=\"-1\">" + NL + 1.529 + "<A HREF=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</A>(<A HREF=\"../pkg/AnnotationType.html#optional\">optional</A>=\"Class Annotation\"," + NL + 1.530 + " <A HREF=\"../pkg/AnnotationType.html#required\">required</A>=1994)" + NL + 1.531 + "</FONT>public class <B>AnnotationTypeUsage</B><DT>extends java.lang.Object</DL>"}, 1.532 + 1.533 + //FIELD 1.534 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.535 + "<FONT SIZE=\"-1\">" + NL + 1.536 + "<A HREF=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</A>(<A HREF=\"../pkg/AnnotationType.html#optional\">optional</A>=\"Field Annotation\"," + NL + 1.537 + " <A HREF=\"../pkg/AnnotationType.html#required\">required</A>=1994)" + NL + 1.538 + "</FONT>public int <B>field</B>"}, 1.539 + 1.540 + //CONSTRUCTOR 1.541 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.542 + "<FONT SIZE=\"-1\">" + NL + 1.543 + "<A HREF=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</A>(<A HREF=\"../pkg/AnnotationType.html#optional\">optional</A>=\"Constructor Annotation\"," + NL + 1.544 + " <A HREF=\"../pkg/AnnotationType.html#required\">required</A>=1994)" + NL + 1.545 + "</FONT>public <B>AnnotationTypeUsage</B>()"}, 1.546 + 1.547 + //METHOD 1.548 + {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 1.549 + "<FONT SIZE=\"-1\">" + NL + 1.550 + "<A HREF=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</A>(<A HREF=\"../pkg/AnnotationType.html#optional\">optional</A>=\"Method Annotation\"," + NL + 1.551 + " <A HREF=\"../pkg/AnnotationType.html#required\">required</A>=1994)" + NL + 1.552 + "</FONT>public void <B>method</B>()"}, 1.553 + 1.554 + //================================= 1.555 + // Make sure annotation types do not 1.556 + // trigger this warning. 1.557 + //================================= 1.558 + {WARNING_OUTPUT, 1.559 + "Internal error: package sets don't match: [] with: null" 1.560 + }, 1.561 + }; 1.562 + 1.563 + /** 1.564 + * The entry point of the test. 1.565 + * @param args the array of command line arguments. 1.566 + */ 1.567 + public static void main(String[] args) { 1.568 + TestNewLanguageFeatures tester = new TestNewLanguageFeatures(); 1.569 + run(tester, ARGS, TEST, NEGATED_TEST); 1.570 + tester.printSummary(); 1.571 + } 1.572 + 1.573 + /** 1.574 + * {@inheritDoc} 1.575 + */ 1.576 + public String getBugId() { 1.577 + return BUG_ID; 1.578 + } 1.579 + 1.580 + /** 1.581 + * {@inheritDoc} 1.582 + */ 1.583 + public String getBugName() { 1.584 + return getClass().getName(); 1.585 + } 1.586 +}