langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPrivateFlag.java
changeset 23971 f5ff1f5a8dee
parent 21478 fa4c7cda1b41
child 24065 fc4022e50129
equal deleted inserted replaced
23970:76f4acb11952 23971:f5ff1f5a8dee
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    37 
    37 
    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 + "/pkg1/SubClass.html",
    43          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    43          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    44                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
    44                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
    45 
    45 
    46         //The package private method should be overriden since the base and sub class are in the same
    46         //The package private method should be overriden since the base and sub class are in the same
    47         //package.
    47         //package.
    48         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
    48         {BUG_ID + "/pkg1/SubClass.html",
    49          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    49          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    50                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"},
    50                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"},
    51 
    51 
    52         //The public method in different package should be overriden
    52         //The public method in different package should be overriden
    53         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
    53         {BUG_ID + "/pkg2/SubClass.html",
    54          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    54          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    55                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
    55                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
    56     };
    56     };
    57 
    57 
    58     private static final String[][] NEGATED_TEST = {
    58     private static final String[][] NEGATED_TEST = {
    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 + "/pkg1/SubClass.html",
    62          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    62          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    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 + "/pkg2/SubClass.html",
    67          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    67          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    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 + "/pkg2/SubClass.html",
    73          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    73          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    74                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"}
    74                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"}
    75 
    75 
    76 
    76 
    77     };
    77     };
    78 
    78