test/com/sun/javadoc/testTypeParams/TestTypeParameters.java

Print this page
rev 2307 : JDK-8031670: remove -source/-target 1.4 and 1.5


  25  * @test
  26  * @bug      4927167 4974929 7010344 8025633
  27  * @summary  When the type parameters are more than 10 characters in length,
  28  *           make sure there is a line break between type params and return type
  29  *           in member summary. Also, test for type parameter links in package-summary and
  30  *           class-use pages. The class/annotation pages should check for type
  31  *           parameter links in the class/annotation signature section when -linksource is set.
  32  * @author   jamieh
  33  * @library  ../lib/
  34  * @build    JavadocTester TestTypeParameters
  35  * @run main TestTypeParameters
  36  */
  37 
  38 public class TestTypeParameters extends JavadocTester {
  39 
  40     //Test information.
  41     private static final String BUG_ID = "4927167-4974929-7010344";
  42 
  43     //Javadoc arguments.
  44     private static final String[] ARGS1 = new String[]{
  45         "-d", BUG_ID, "-use", "-source", "1.5", "-sourcepath", SRC_DIR,
  46         "pkg"
  47     };
  48     private static final String[] ARGS2 = new String[]{
  49         "-d", BUG_ID, "-linksource", "-source", "1.5", "-sourcepath", SRC_DIR,
  50         "pkg"
  51     };
  52 
  53     //Input for string search tests.
  54     private static final String[][] TEST1 = {
  55         {BUG_ID + FS + "pkg" + FS + "C.html",
  56             "<td class=\"colFirst\"><code>&lt;W extends java.lang.String,V extends " +
  57             "java.util.List&gt;<br>java.lang.Object</code></td>"
  58         },
  59         {BUG_ID + FS + "pkg" + FS + "C.html",
  60             "<code>&lt;T&gt;&nbsp;java.lang.Object</code>"
  61         },
  62         {BUG_ID + FS + "pkg" + FS + "package-summary.html",
  63             "C</a>&lt;E extends <a href=\"../pkg/Parent.html\" " +
  64             "title=\"class in pkg\">Parent</a>&gt;"
  65         },
  66         {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "Foo4.html",
  67             "<a href=\"../../pkg/ClassUseTest3.html\" title=\"class in pkg\">" +
  68             "ClassUseTest3</a>&lt;T extends <a href=\"../../pkg/ParamTest2.html\" " +
  69             "title=\"class in pkg\">ParamTest2</a>&lt;java.util.List&lt;? extends " +




  25  * @test
  26  * @bug      4927167 4974929 7010344 8025633
  27  * @summary  When the type parameters are more than 10 characters in length,
  28  *           make sure there is a line break between type params and return type
  29  *           in member summary. Also, test for type parameter links in package-summary and
  30  *           class-use pages. The class/annotation pages should check for type
  31  *           parameter links in the class/annotation signature section when -linksource is set.
  32  * @author   jamieh
  33  * @library  ../lib/
  34  * @build    JavadocTester TestTypeParameters
  35  * @run main TestTypeParameters
  36  */
  37 
  38 public class TestTypeParameters extends JavadocTester {
  39 
  40     //Test information.
  41     private static final String BUG_ID = "4927167-4974929-7010344";
  42 
  43     //Javadoc arguments.
  44     private static final String[] ARGS1 = new String[]{
  45         "-d", BUG_ID, "-use", "-sourcepath", SRC_DIR,
  46         "pkg"
  47     };
  48     private static final String[] ARGS2 = new String[]{
  49         "-d", BUG_ID, "-linksource", "-sourcepath", SRC_DIR,
  50         "pkg"
  51     };
  52 
  53     //Input for string search tests.
  54     private static final String[][] TEST1 = {
  55         {BUG_ID + FS + "pkg" + FS + "C.html",
  56             "<td class=\"colFirst\"><code>&lt;W extends java.lang.String,V extends " +
  57             "java.util.List&gt;<br>java.lang.Object</code></td>"
  58         },
  59         {BUG_ID + FS + "pkg" + FS + "C.html",
  60             "<code>&lt;T&gt;&nbsp;java.lang.Object</code>"
  61         },
  62         {BUG_ID + FS + "pkg" + FS + "package-summary.html",
  63             "C</a>&lt;E extends <a href=\"../pkg/Parent.html\" " +
  64             "title=\"class in pkg\">Parent</a>&gt;"
  65         },
  66         {BUG_ID + FS + "pkg" + FS + "class-use" + FS + "Foo4.html",
  67             "<a href=\"../../pkg/ClassUseTest3.html\" title=\"class in pkg\">" +
  68             "ClassUseTest3</a>&lt;T extends <a href=\"../../pkg/ParamTest2.html\" " +
  69             "title=\"class in pkg\">ParamTest2</a>&lt;java.util.List&lt;? extends " +