langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethods.java
changeset 21478 fa4c7cda1b41
parent 19253 b97b3e18547f
child 23971 f5ff1f5a8dee
equal deleted inserted replaced
21477:02dc78554e0c 21478:fa4c7cda1b41
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 4634891
    26  * @bug 4634891 8026567
    27  * @summary Determine if overriden methods are properly documented when
    27  * @summary Determine if overriden methods are properly documented when
    28  * -protected (default) visibility flag is used.
    28  * -protected (default) visibility flag is used.
    29  * @author jamieh
    29  * @author jamieh
    30  * @library ../lib/
    30  * @library ../lib/
    31  * @build JavadocTester
    31  * @build JavadocTester
    38     private static final String BUG_ID = "4634891";
    38     private static final String BUG_ID = "4634891";
    39 
    39 
    40     private static final String[][] TEST = {
    40     private static final String[][] TEST = {
    41         //The public method should be overriden
    41         //The public method should be overriden
    42         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
    42         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
    43          "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
    43          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    44                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
    44                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
    45 
    45 
    46         //The public method in different package should be overriden
    46         //The public method in different package should be overriden
    47         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
    47         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
    48          "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
    48          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    49                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"}
    49                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"}
    50     };
    50     };
    51 
    51 
    52     private static final String[][] NEGATED_TEST = {
    52     private static final String[][] NEGATED_TEST = {
    53 
    53 
    54         //The package private method should be overriden since the base and sub class are in the same
    54         //The package private method should be overriden since the base and sub class are in the same
    55         //package.  However, the link should not show up because the package private methods are not documented.
    55         //package.  However, the link should not show up because the package private methods are not documented.
    56         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
    56         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
    57          "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
    57          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    58                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"},
    58                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"},
    59 
    59 
    60         //The private method in should not be overriden
    60         //The private method in should not be overriden
    61         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
    61         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
    62          "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
    62          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    63                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
    63                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
    64 
    64 
    65         //The private method in different package should not be overriden
    65         //The private method in different package should not be overriden
    66         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
    66         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
    67          "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
    67          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    68                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
    68                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
    69 
    69 
    70         //The package private method should not be overriden since the base and sub class are in
    70         //The package private method should not be overriden since the base and sub class are in
    71         //different packages.
    71         //different packages.
    72         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
    72         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",