test/com/sun/javadoc/testInterface/TestInterface.java

Print this page




  25  * @test
  26  * @bug      4682448 4947464 5029946
  27  * @summary  Verify that the public modifier does not show up in the
  28  *           documentation for public methods, as recommended by the JLS.
  29  *           If A implements I and B extends A, B should be in the list of
  30  *           implementing classes in the documentation for I.
  31  * @author   jamieh
  32  * @library  ../lib/
  33  * @build    JavadocTester
  34  * @build    TestInterface
  35  * @run main TestInterface
  36  */
  37 
  38 public class TestInterface extends JavadocTester {
  39 
  40     //Test information.
  41     private static final String BUG_ID = "4682448-4947464-5029946";
  42 
  43     //Javadoc arguments.
  44     private static final String[] ARGS = new String[] {
  45         "-source", "1.5", "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
  46     };
  47 
  48     //Input for string search tests.
  49     private static final String[][] TEST = {
  50         {BUG_ID + FS + "pkg" + FS + "Interface.html",
  51             "int <STRONG>method</STRONG>()"},
  52         {BUG_ID + FS + "pkg" + FS + "Interface.html",
  53             "static final int <STRONG>field</STRONG>"},
  54 
  55 
  56         // Make sure known implementing class list is correct and omits type parameters.
  57         {BUG_ID + FS + "pkg" + FS + "Interface.html",
  58             "<DT><STRONG>All Known Implementing Classes:</STRONG></DT> " +
  59             "<DD><A HREF=\"../pkg/Child.html\" " +
  60             "title=\"class in pkg\">Child</A>, " +
  61             "<A HREF=\"../pkg/Parent.html\" title=\"class in pkg\">" +
  62             "Parent</A></DD>"},
  63 
  64          // Make sure "All Implemented Interfaces": has substituted type parameters
  65          {BUG_ID + FS + "pkg" + FS + "Child.html",




  25  * @test
  26  * @bug      4682448 4947464 5029946
  27  * @summary  Verify that the public modifier does not show up in the
  28  *           documentation for public methods, as recommended by the JLS.
  29  *           If A implements I and B extends A, B should be in the list of
  30  *           implementing classes in the documentation for I.
  31  * @author   jamieh
  32  * @library  ../lib/
  33  * @build    JavadocTester
  34  * @build    TestInterface
  35  * @run main TestInterface
  36  */
  37 
  38 public class TestInterface extends JavadocTester {
  39 
  40     //Test information.
  41     private static final String BUG_ID = "4682448-4947464-5029946";
  42 
  43     //Javadoc arguments.
  44     private static final String[] ARGS = new String[] {
  45         "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
  46     };
  47 
  48     //Input for string search tests.
  49     private static final String[][] TEST = {
  50         {BUG_ID + FS + "pkg" + FS + "Interface.html",
  51             "int <STRONG>method</STRONG>()"},
  52         {BUG_ID + FS + "pkg" + FS + "Interface.html",
  53             "static final int <STRONG>field</STRONG>"},
  54 
  55 
  56         // Make sure known implementing class list is correct and omits type parameters.
  57         {BUG_ID + FS + "pkg" + FS + "Interface.html",
  58             "<DT><STRONG>All Known Implementing Classes:</STRONG></DT> " +
  59             "<DD><A HREF=\"../pkg/Child.html\" " +
  60             "title=\"class in pkg\">Child</A>, " +
  61             "<A HREF=\"../pkg/Parent.html\" title=\"class in pkg\">" +
  62             "Parent</A></DD>"},
  63 
  64          // Make sure "All Implemented Interfaces": has substituted type parameters
  65          {BUG_ID + FS + "pkg" + FS + "Child.html",