langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.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                  "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
    45                  "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
    46                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
    46                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
    47 
    47 
    48         //The public method in different package should be overriden
    48         //The public method in different package should be overriden
    49         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
    49         {BUG_ID + "/pkg2/SubClass.html",
    50          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    50          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    51                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">" +
    51                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">" +
    52                  "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
    52                  "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
    53                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
    53                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
    54 
    54 
    55         //The package private method should be overriden since the base and sub class are in the same
    55         //The package private method should be overriden since the base and sub class are in the same
    56         //package.
    56         //package.
    57         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
    57         {BUG_ID + "/pkg1/SubClass.html",
    58          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    58          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    59                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod--\">" +
    59                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod--\">" +
    60                  "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>" +
    60                  "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>" +
    61                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}
    61                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}
    62     };
    62     };
    63 
    63 
    64     private static final String[][] NEGATED_TEST = {
    64     private static final String[][] NEGATED_TEST = {
    65 
    65 
    66         //The private method in should not be overriden
    66         //The private method in should not be overriden
    67         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
    67         {BUG_ID + "/pkg1/SubClass.html",
    68          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    68          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    69                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"},
    69                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"},
    70 
    70 
    71         //The private method in different package should not be overriden
    71         //The private method in different package should not be overriden
    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#privateMethod()\">"},
    74                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"},
    75 
    75 
    76         //The package private method should not be overriden since the base and sub class are in
    76         //The package private method should not be overriden since the base and sub class are in
    77         //different packages.
    77         //different packages.
    78         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
    78         {BUG_ID + "/pkg2/SubClass.html",
    79          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
    79          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
    80                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">"},
    80                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">"},
    81     };
    81     };
    82 
    82 
    83     private static final String[] ARGS =
    83     private static final String[] ARGS =
    84         new String[] {
    84         new String[] {