duke@1: /* duke@1: * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as duke@1: * published by the Free Software Foundation. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * duke@1: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, duke@1: * CA 95054 USA or visit www.sun.com if you need additional information or duke@1: * have any questions. duke@1: */ duke@1: duke@1: /* duke@1: * @test duke@1: * @bug 4789689 4905985 4927164 4827184 4993906 5004549 duke@1: * @summary Run Javadoc on a set of source files that demonstrate new duke@1: * language features. Check the output to ensure that the new duke@1: * language features are properly documented. duke@1: * @author jamieh duke@1: * @library ../lib/ duke@1: * @build JavadocTester duke@1: * @build TestNewLanguageFeatures duke@1: * @run main TestNewLanguageFeatures duke@1: */ duke@1: duke@1: public class TestNewLanguageFeatures extends JavadocTester { duke@1: duke@1: //Test information. duke@1: private static final String BUG_ID = "4789689-4905985-4927164-4827184-4993906"; duke@1: duke@1: //Javadoc arguments. duke@1: private static final String[] ARGS = new String[] { duke@1: "-d", BUG_ID, "-use", "-source", "1.5", "-sourcepath", SRC_DIR, "pkg", "pkg1", "pkg2" duke@1: }; duke@1: duke@1: //Input for string search tests. duke@1: private static final String[][] TEST = duke@1: { duke@1: //================================= duke@1: // ENUM TESTING duke@1: //================================= duke@1: //Make sure enum header is correct. duke@1: {BUG_ID + FS + "pkg" + FS + "Coin.html", "Enum Coin"}, duke@1: //Make sure enum signature is correct. duke@1: {BUG_ID + FS + "pkg" + FS + "Coin.html", "public enum "+ bpatel@182: "Coin
extends java.lang.Enum<" + duke@1: "Coin>" duke@1: }, duke@1: //Check for enum constant section bpatel@182: {BUG_ID + FS + "pkg" + FS + "Coin.html", "Enum Constant Summary"}, duke@1: //Detail for enum constant duke@1: {BUG_ID + FS + "pkg" + FS + "Coin.html", bpatel@182: "Dime"}, duke@1: //Automatically insert documentation for values() and valueOf(). duke@1: {BUG_ID + FS + "pkg" + FS + "Coin.html", duke@1: "Returns an array containing the constants of this enum type,"}, duke@1: {BUG_ID + FS + "pkg" + FS + "Coin.html", duke@1: "Returns the enum constant of this type with the specified name"}, duke@1: {BUG_ID + FS + "pkg" + FS + "Coin.html", "for (Coin c : Coin.values())"}, duke@1: {BUG_ID + FS + "pkg" + FS + "Coin.html", "Overloaded valueOf() method has correct documentation."}, duke@1: {BUG_ID + FS + "pkg" + FS + "Coin.html", "Overloaded values method has correct documentation."}, duke@1: duke@1: //================================= duke@1: // TYPE PARAMETER TESTING duke@1: //================================= duke@1: //Make sure the header is correct. duke@1: {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", duke@1: "Class TypeParameters<E>"}, duke@1: //Check class type parameters section. duke@1: {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", bpatel@182: "
Type Parameters:
E - " + duke@1: "the type parameter for this class."}, duke@1: //Type parameters in @see/@link duke@1: {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", bpatel@182: "
See Also:
TypeParameters"}, duke@1: //Method that uses class type parameter. duke@1: {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", duke@1: "(E param)"}, duke@1: //Method type parameter section. duke@1: {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", bpatel@182: "Type Parameters:
T - This is the first " + duke@1: "type parameter.
V - This is the second type " + duke@1: "parameter."}, duke@1: //Signature of method with type parameters duke@1: {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", duke@1: "public <T extends java.util.List,V> " + bpatel@182: "java.lang.String[] methodThatHasTypeParameters"}, duke@1: //Wildcard testing. duke@1: {BUG_ID + FS + "pkg" + FS + "Wildcards.html", duke@1: "" + duke@1: "TypeParameters<? super java.lang.String> a"}, duke@1: {BUG_ID + FS + "pkg" + FS + "Wildcards.html", duke@1: "" + duke@1: "TypeParameters<? extends java.lang.StringBuffer> b"}, duke@1: {BUG_ID + FS + "pkg" + FS + "Wildcards.html", duke@1: "" + duke@1: "TypeParameters c"}, duke@1: //Bad type parameter warnings. duke@1: {WARNING_OUTPUT, "warning - @param argument " + duke@1: "\"\" is not a type parameter name."}, duke@1: {WARNING_OUTPUT, "warning - @param argument " + duke@1: "\"\" is not a type parameter name."}, duke@1: duke@1: //Signature of subclass that has type parameters. duke@1: {BUG_ID + FS + "pkg" + FS + "TypeParameterSubClass.html", bpatel@182: "public class TypeParameterSubClass<T extends java.lang.String>" + bpatel@182: "
extends TypeParameterSuperClass<T>"}, duke@1: duke@1: //Interface generic parameter substitution duke@1: //Signature of subclass that has type parameters. duke@1: {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", bpatel@182: "All Implemented Interfaces:
SubInterface<E>, SuperInterface<E>
"}, duke@1: {BUG_ID + FS + "pkg" + FS + "SuperInterface.html", bpatel@182: "All Known Subinterfaces:
SubInterface<V>
"}, duke@1: {BUG_ID + FS + "pkg" + FS + "SubInterface.html", bpatel@182: "All Superinterfaces:
SuperInterface<V>
"}, duke@1: duke@1: //================================= duke@1: // VAR ARG TESTING duke@1: //================================= duke@1: {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int... i)"}, duke@1: {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[][]... i)"}, duke@1: {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[]...)"}, duke@1: {BUG_ID + FS + "pkg" + FS + "VarArgs.html", duke@1: "" + duke@1: "TypeParameters... t"}, duke@1: duke@1: //================================= duke@1: // ANNOTATION TYPE TESTING duke@1: //================================= duke@1: //Make sure the summary links are correct. duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", duke@1: "SUMMARY: " + duke@1: "REQUIRED | " + duke@1: "OPTIONAL"}, duke@1: //Make sure the detail links are correct. duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", duke@1: "DETAIL: ELEMENT"}, duke@1: //Make sure the heading is correct. duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", duke@1: "Annotation Type AnnotationType"}, duke@1: //Make sure the signature is correct. duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", bpatel@182: "public @interface AnnotationType"}, duke@1: //Make sure member summary headings are correct. duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", bpatel@182: "Required Element Summary"}, duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", bpatel@182: "Optional Element Summary"}, duke@1: //Make sure element detail heading is correct duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", duke@1: "Element Detail"}, duke@1: //Make sure default annotation type value is printed when necessary. duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", bpatel@182: "Default:
\"unknown\"
"}, duke@1: duke@1: //================================= duke@1: // ANNOTATION TYPE USAGE TESTING duke@1: //================================= duke@1: duke@1: //PACKAGE duke@1: {BUG_ID + FS + "pkg" + FS + "package-summary.html", duke@1: "@AnnotationType(optional=\"Package Annotation\"," + NL + duke@1: " required=1994)"}, duke@1: duke@1: //CLASS duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "" + duke@1: "@AnnotationType(optional=\"Class Annotation\","+NL + duke@1: " required=1994)"+NL + bpatel@182: "public class AnnotationTypeUsage
extends java.lang.Object"}, duke@1: duke@1: //FIELD duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "" + duke@1: "@AnnotationType(optional=\"Field Annotation\","+NL + duke@1: " required=1994)"+NL + bpatel@182: "public int field"}, duke@1: duke@1: //CONSTRUCTOR duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "" + duke@1: "@AnnotationType(optional=\"Constructor Annotation\","+NL + duke@1: " required=1994)"+NL + bpatel@182: "public AnnotationTypeUsage()"}, duke@1: duke@1: //METHOD duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "" + duke@1: "@AnnotationType(optional=\"Method Annotation\","+NL + duke@1: " required=1994)"+NL + bpatel@182: "public void method()"}, duke@1: duke@1: //METHOD PARAMS duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "
" + NL +
bpatel@182:                 "public void methodWithParams(@AnnotationType(optional=\"Parameter Annotation\",required=1994)" + NL +
duke@1:                 "                             int documented," + NL +
duke@1:                 "                             int undocmented)
"}, duke@1: duke@1: //CONSTRUCTOR PARAMS duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "
" + NL +
bpatel@182:                                 "public AnnotationTypeUsage(@AnnotationType(optional=\"Constructor Param Annotation\",required=1994)" + NL +
duke@1:                                 "                           int documented," + NL +
duke@1:                 "                           int undocmented)
"}, duke@1: duke@1: //================================= duke@1: // ANNOTATION TYPE USAGE TESTING (All Different Types). duke@1: //================================= duke@1: duke@1: //Integer duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "d=3.14,"}, duke@1: duke@1: //Double duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "d=3.14,"}, duke@1: duke@1: //Boolean duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "b=true,"}, duke@1: duke@1: //String duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "s=\"sigh\","}, duke@1: duke@1: //Class duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "c=Foo.class,"}, duke@1: duke@1: //Bounded Class duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "w=TypeParameterSubClass.class,"}, duke@1: duke@1: //Enum duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "e=Penny,"}, duke@1: duke@1: //Annotation Type duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "a=@AnnotationType(optional=\"foo\",required=1994),"}, duke@1: duke@1: //String Array duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "sa={\"up\",\"down\"},"}, duke@1: duke@1: //Primitive duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "primitiveClassTest=boolean.class,"}, duke@1: duke@1: //XXX: Add array test case after this if fixed: duke@1: //5020899: Incorrect internal representation of class-valued annotation elements duke@1: duke@1: //Make sure that annotations are surrounded by
 and 
duke@1: {BUG_ID + FS + "pkg1" + FS + "B.html", duke@1: "
@A"},
duke@1:             {BUG_ID + FS + "pkg1" + FS + "B.html",
bpatel@182:                 "public interface B" + NL +
duke@1:                     "
"}, duke@1: duke@1: duke@1: //============================================================== duke@1: // Handle multiple bounds. duke@1: //============================================================== duke@1: {BUG_ID + FS + "pkg" + FS + "MultiTypeParameters.html", bpatel@182: "public <T extends java.lang.Number & java.lang.Runnable> T foo(T t)"}, duke@1: duke@1: //============================================================== duke@1: // Test Class-Use Documenation for Type Parameters. duke@1: //============================================================== duke@1: duke@1: //ClassUseTest1: duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", duke@1: "Classes in pkg2 with type parameters of type Foo" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", bpatel@182: "ClassUseTest1<T extends Foo & Foo2>" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", duke@1: "Methods in pkg2 with type parameters of type Foo" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", bpatel@182: "ClassUseTest1.method(T t)" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", duke@1: "Fields in pkg2 with type parameters of type Foo" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", duke@1: "ParamTest<Foo>" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", duke@1: "Fields in pkg2 declared as ParamTest" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", duke@1: "ParamTest<Foo>" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html", duke@1: "Classes in pkg2 with type parameters of type Foo2" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html", bpatel@182: "ClassUseTest1<T extends Foo & Foo2>" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html", duke@1: "Methods in pkg2 with type parameters of type Foo2" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html", bpatel@182: "ClassUseTest1.method(T t)" duke@1: }, duke@1: duke@1: //ClassUseTest2: > duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", duke@1: "Classes in pkg2 with type parameters of type ParamTest" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", bpatel@182: "ClassUseTest2<T extends ParamTest<Foo3>>" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", duke@1: "Methods in pkg2 with type parameters of type ParamTest" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", bpatel@182: "ClassUseTest2.method(T t)" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", duke@1: "Fields in pkg2 declared as ParamTest" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", duke@1: "ParamTest<Foo>" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", duke@1: "Methods in pkg2 with type parameters of type ParamTest" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", duke@1: "<T extends ParamTest<Foo3>>" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", duke@1: "Classes in pkg2 with type parameters of type Foo3" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", bpatel@182: "ClassUseTest2<T extends ParamTest<Foo3>>" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", duke@1: "Methods in pkg2 with type parameters of type Foo3" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", bpatel@182: "ClassUseTest2.method(T t)" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", duke@1: "Methods in pkg2 that return types with arguments of type Foo3" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", duke@1: "<T extends ParamTest<Foo3>>" duke@1: }, duke@1: duke@1: //ClassUseTest3: >> duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", duke@1: "Classes in pkg2 with type parameters of type ParamTest2" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", bpatel@182: "ClassUseTest3<T extends ParamTest2<java.util.List<? extends Foo4>>>" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", duke@1: "Methods in pkg2 with type parameters of type ParamTest2" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", bpatel@182: "ClassUseTest3.method(T t)" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", duke@1: "Methods in pkg2 with type parameters of type ParamTest2" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", duke@1: "<T extends ParamTest2<java.util.List<? extends Foo4>>>" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", duke@1: "Classes in pkg2 with type parameters of type Foo4" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", bpatel@182: "ClassUseTest3<T extends ParamTest2<java.util.List<? extends Foo4>>>" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", duke@1: "Methods in pkg2 with type parameters of type Foo4" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", bpatel@182: "ClassUseTest3.method(T t)" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", duke@1: "Methods in pkg2 that return types with arguments of type Foo4" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", duke@1: "<T extends ParamTest2<java.util.List<? extends Foo4>>>" duke@1: }, duke@1: duke@1: //Type parameters in constructor and method args duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", duke@1: "Method parameters in pkg2 with type arguments of type Foo4" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: " void" + NL + bpatel@182: "ClassUseTest3.method(java.util.Set<Foo4> p)" duke@1: }, duke@1: {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", duke@1: "Constructor parameters in pkg2 with type arguments of type Foo4" + NL + duke@1: "" + NL + duke@1: "" + NL + bpatel@182: "ClassUseTest3(java.util.Set<Foo4> p)" duke@1: }, duke@1: duke@1: //================================= duke@1: // Annotatation Type Usage duke@1: //================================= duke@1: {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", duke@1: "" + NL + duke@1: "Packages with annotations of type AnnotationType" + NL + duke@1: "" + NL + duke@1: "" + NL + bpatel@182: "pkg" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", duke@1: "Classes in pkg with annotations of type AnnotationType" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: " class" + NL + bpatel@182: "AnnotationTypeUsage" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", duke@1: "Fields in pkg with annotations of type AnnotationType" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: " int" + NL + bpatel@182: "AnnotationTypeUsage.field" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", duke@1: "Methods in pkg with annotations of type AnnotationType" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: " void" + NL + bpatel@182: "AnnotationTypeUsage.method()" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", duke@1: "Method parameters in pkg with annotations of type AnnotationType" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: "" + NL + duke@1: " void" + NL + bpatel@182: "AnnotationTypeUsage.methodWithParams(int documented," + NL + duke@1: " int undocmented)" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", duke@1: "Constructors in pkg with annotations of type AnnotationType" + NL + duke@1: "" + NL + duke@1: "" + NL + bpatel@182: "AnnotationTypeUsage()" duke@1: }, duke@1: duke@1: {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "AnnotationType.html", duke@1: "Constructor parameters in pkg with annotations of type AnnotationType" + NL + duke@1: "" + NL + duke@1: "" + NL + bpatel@182: "AnnotationTypeUsage(int documented," + NL + duke@1: " int undocmented)" duke@1: }, duke@1: duke@1: //================================= duke@1: // TYPE PARAMETER IN INDEX duke@1: //================================= duke@1: {BUG_ID + FS + "index-all.html", bpatel@182: "method(Vector<Object>)" duke@1: }, duke@1: //================================= duke@1: // TYPE PARAMETER IN INDEX duke@1: //================================= duke@1: {BUG_ID + FS + "index-all.html", bpatel@182: "method(Vector<Object>)" duke@1: }, duke@1: }; duke@1: private static final String[][] NEGATED_TEST = { duke@1: //================================= duke@1: // ENUM TESTING duke@1: //================================= duke@1: //NO constructor section bpatel@182: {BUG_ID + FS + "pkg" + FS + "Coin.html", "Constructor Summary"}, duke@1: //================================= duke@1: // TYPE PARAMETER TESTING duke@1: //================================= duke@1: //No type parameters in class frame. duke@1: {BUG_ID + FS + "allclasses-frame.html", duke@1: "" + duke@1: "TypeParameters<E>" duke@1: }, duke@1: duke@1: //============================================================== duke@1: // ANNOTATION TYPE USAGE TESTING (When @Documented is omitted) duke@1: //=============================================================== duke@1: duke@1: //CLASS duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "" + NL + duke@1: "@AnnotationTypeUndocumented(optional=\"Class Annotation\"," + NL + duke@1: " required=1994)" + NL + bpatel@182: "public class AnnotationTypeUsage
extends java.lang.Object"}, duke@1: duke@1: //FIELD duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "" + NL + duke@1: "@AnnotationTypeUndocumented(optional=\"Field Annotation\"," + NL + duke@1: " required=1994)" + NL + bpatel@182: "public int field"}, duke@1: duke@1: //CONSTRUCTOR duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "" + NL + duke@1: "@AnnotationTypeUndocumented(optional=\"Constructor Annotation\"," + NL + duke@1: " required=1994)" + NL + bpatel@182: "public AnnotationTypeUsage()"}, duke@1: duke@1: //METHOD duke@1: {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", duke@1: "" + NL + duke@1: "@AnnotationTypeUndocumented(optional=\"Method Annotation\"," + NL + duke@1: " required=1994)" + NL + bpatel@182: "public void method()"}, duke@1: duke@1: //================================= duke@1: // Make sure annotation types do not duke@1: // trigger this warning. duke@1: //================================= duke@1: {WARNING_OUTPUT, duke@1: "Internal error: package sets don't match: [] with: null" duke@1: }, duke@1: }; duke@1: duke@1: /** duke@1: * The entry point of the test. duke@1: * @param args the array of command line arguments. duke@1: */ duke@1: public static void main(String[] args) { duke@1: TestNewLanguageFeatures tester = new TestNewLanguageFeatures(); duke@1: run(tester, ARGS, TEST, NEGATED_TEST); duke@1: tester.printSummary(); duke@1: } duke@1: duke@1: /** duke@1: * {@inheritDoc} duke@1: */ duke@1: public String getBugId() { duke@1: return BUG_ID; duke@1: } duke@1: duke@1: /** duke@1: * {@inheritDoc} duke@1: */ duke@1: public String getBugName() { duke@1: return getClass().getName(); duke@1: } duke@1: }