langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java
changeset 21008 af0b915df7cc
parent 19253 b97b3e18547f
child 21478 fa4c7cda1b41
equal deleted inserted replaced
21007:484c9d902861 21008:af0b915df7cc
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 4638588 4635809 6256068 6270645
    26  * @bug 4638588 4635809 6256068 6270645 8025633
    27  * @summary Test to make sure that members are inherited properly in the Javadoc.
    27  * @summary Test to make sure that members are inherited properly in the Javadoc.
    28  *          Verify that inheritence labels are correct.
    28  *          Verify that inheritence labels are correct.
    29  * @author jamieh
    29  * @author jamieh
    30  * @library ../lib/
    30  * @library ../lib/
    31  * @build JavadocTester
    31  * @build JavadocTester
    42         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    42         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    43          "<a href=\"../pkg/BaseClass.html#pubField\">"},
    43          "<a href=\"../pkg/BaseClass.html#pubField\">"},
    44 
    44 
    45         //Public method should be inherited
    45         //Public method should be inherited
    46         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    46         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    47          "<a href=\"../pkg/BaseClass.html#pubMethod()\">"},
    47          "<a href=\"../pkg/BaseClass.html#pubMethod--\">"},
    48 
    48 
    49         //Public inner class should be inherited.
    49         //Public inner class should be inherited.
    50         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    50         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    51          "<a href=\"../pkg/BaseClass.pubInnerClass.html\" title=\"class in pkg\">"},
    51          "<a href=\"../pkg/BaseClass.pubInnerClass.html\" title=\"class in pkg\">"},
    52 
    52 
    54         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    54         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    55          "<a href=\"../pkg/BaseClass.html#proField\">"},
    55          "<a href=\"../pkg/BaseClass.html#proField\">"},
    56 
    56 
    57         //Protected method should be inherited
    57         //Protected method should be inherited
    58         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    58         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    59          "<a href=\"../pkg/BaseClass.html#proMethod()\">"},
    59          "<a href=\"../pkg/BaseClass.html#proMethod--\">"},
    60 
    60 
    61         //Protected inner class should be inherited.
    61         //Protected inner class should be inherited.
    62         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    62         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    63          "<a href=\"../pkg/BaseClass.proInnerClass.html\" title=\"class in pkg\">"},
    63          "<a href=\"../pkg/BaseClass.proInnerClass.html\" title=\"class in pkg\">"},
    64 
    64 
    71                  "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">BaseInterface</a>"},
    71                  "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">BaseInterface</a>"},
    72 
    72 
    73          // Test overriding/implementing methods with generic parameters.
    73          // Test overriding/implementing methods with generic parameters.
    74                  {BUG_ID + FS + "pkg" + FS + "BaseClass.html",
    74                  {BUG_ID + FS + "pkg" + FS + "BaseClass.html",
    75          "<dl>" + NL + "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
    75          "<dl>" + NL + "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
    76                           "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation(java.lang.Class)\">" +
    76                           "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation-java.lang.Class-\">" +
    77                           "getAnnotation</a></code>&nbsp;in interface&nbsp;<code>" +
    77                           "getAnnotation</a></code>&nbsp;in interface&nbsp;<code>" +
    78                           "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">" +
    78                           "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">" +
    79                           "BaseInterface</a></code></dd>" + NL + "</dl>"},
    79                           "BaseInterface</a></code></dd>" + NL + "</dl>"},
    80 
    80 
    81          // Test diamond inheritence member summary (6256068)
    81          // Test diamond inheritence member summary (6256068)
    82                  {BUG_ID + FS + "diamond" + FS + "Z.html",
    82                  {BUG_ID + FS + "diamond" + FS + "Z.html",
    83                  "<code><a href=\"../diamond/A.html#aMethod()\">aMethod</a></code>"},
    83                  "<code><a href=\"../diamond/A.html#aMethod--\">aMethod</a></code>"},
    84 
    84 
    85          // Test that doc is inherited from closed parent (6270645)
    85          // Test that doc is inherited from closed parent (6270645)
    86                  {BUG_ID + FS + "inheritDist" + FS + "C.html",
    86                  {BUG_ID + FS + "inheritDist" + FS + "C.html",
    87                  "<div class=\"block\">m1-B</div>"},
    87                  "<div class=\"block\">m1-B</div>"},
    88 
    88 
    89     };
    89     };
    90 
    90 
    91     private static final String[][] NEGATED_TEST = {
    91     private static final String[][] NEGATED_TEST = {
    92         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    92         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
    93         "<a href=\"../pkg/BaseClass.html#staticMethod()\">staticMethod</a></code>"},
    93         "<a href=\"../pkg/BaseClass.html#staticMethod--\">staticMethod</a></code>"},
    94     };
    94     };
    95     private static final String[] ARGS =
    95     private static final String[] ARGS =
    96         new String[] {
    96         new String[] {
    97             "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", "diamond", "inheritDist"};
    97             "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", "diamond", "inheritDist"};
    98 
    98