langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java
author jjg
Tue, 22 Apr 2014 17:57:40 -0700
changeset 24072 e7549dcbc4af
parent 24065 fc4022e50129
child 24399 af1a0220d0fa
permissions -rw-r--r--
8040903: Clean up use of BUG_ID in javadoc tests Reviewed-by: ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
     2
 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2216
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2216
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2216
diff changeset
    21
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
/*
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
 * @test
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21008
diff changeset
    26
 * @bug      4780441 4874845 4978816 8014017 8016328 8025633 8026567
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
 * @summary  Make sure that when the -private flag is not used, members
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
 *           inherited from package private class are documented in the child.
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
 *           Make sure that when a method inherits documentation from a method
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
 *           in a non-public class/interface, the non-public class/interface
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
 *           is not mentioned anywhere (not even in the signature or tree).
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
 *           Make sure that when a private interface method with generic parameters
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 *           is implemented, the comments can be inherited properly.
18651
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
    36
 *
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
    37
 *           Make sure when no modifier appear in the class signature, the
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
    38
 *           signature is displayed correctly without extra space at the beginning.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 * @author   jamieh
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 * @library  ../lib/
18651
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
    41
 * @build    JavadocTester TestPrivateClasses
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 * @run main TestPrivateClasses
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
public class TestPrivateClasses extends JavadocTester {
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
    //Javadoc arguments.
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
    private static final String[] ARGS1 = new String[] {
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    49
        "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg", "pkg2"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
    };
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
    private static final String[] ARGS2 = new String[] {
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    52
        "-d", OUTPUT_DIR + "-2", "-sourcepath", SRC_DIR, "-private",
23139
612191246a7d 8031670: Remove unneeded -source options in javadoc tests
darcy
parents: 21478
diff changeset
    53
            "pkg", "pkg2"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
    };
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
    // Test output when -private flag is not used.
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
    private static final String[][] TEST1 = {
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
        // Field inheritence from non-public superclass.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    59
        { "pkg/PublicChild.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    60
            "<a href=\"../pkg/PublicChild.html#fieldInheritedFromParent\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    61
                "fieldInheritedFromParent</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
        // Method inheritence from non-public superclass.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    65
        { "pkg/PublicChild.html",
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 20257
diff changeset
    66
            "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent-int-\">" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    67
                "methodInheritedFromParent</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
        // Field inheritence from non-public superinterface.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    71
        { "pkg/PublicInterface.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    72
            "<a href=\"../pkg/PublicInterface.html#fieldInheritedFromInterface\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    73
                "fieldInheritedFromInterface</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
        // Method inheritence from non-public superinterface.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    77
        { "pkg/PublicInterface.html",
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 20257
diff changeset
    78
            "<a href=\"../pkg/PublicInterface.html#methodInterface-int-\">" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    79
                "methodInterface</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
        // private class does not show up in tree
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    83
        { "pkg/PublicChild.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
    84
            "<ul class=\"inheritance\">\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
    85
            "<li>java.lang.Object</li>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
    86
            "<li>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
    87
            "<ul class=\"inheritance\">\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
    88
            "<li>pkg.PublicChild</li>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
    89
            "</ul>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
    90
            "</li>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
    91
            "</ul>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
        // Method is documented as though it is declared in the inheriting method.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    95
        { "pkg/PublicChild.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    96
            "<pre>public&nbsp;void&nbsp;methodInheritedFromParent(int&nbsp;p1)"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
        //Make sure implemented interfaces from private superclass are inherited
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   100
        { "pkg/PublicInterface.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   101
            "<dl>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   102
            "<dt>All Known Implementing Classes:</dt>\n" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   103
            "<dd><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">" +
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   104
            "PublicChild</a></dd>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   105
            "</dl>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   107
        { "pkg/PublicChild.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   108
            "<dl>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   109
            "<dt>All Implemented Interfaces:</dt>\n" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   110
            "<dd><a href=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">" +
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   111
            "PublicInterface</a></dd>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   112
            "</dl>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
        //Generic interface method test.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   115
        { "pkg2/C.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
            "This comment should get copied to the implementing class"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
    };
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
    private static final String[][] NEGATED_TEST1 = {
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
       // Should not document that a method overrides method from private class.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   120
      { "pkg/PublicChild.html",
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21008
diff changeset
   121
        "<span class=\"overrideSpecifyLabel\">Overrides:</span>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
      // Should not document that a method specified by private interface.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   123
      { "pkg/PublicChild.html",
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21008
diff changeset
   124
        "<span class=\"overrideSpecifyLabel\">Specified by:</span>"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   125
      { "pkg/PublicInterface.html",
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21008
diff changeset
   126
        "<span class=\"overrideSpecifyLabel\">Specified by:</span>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
      // Should not mention that any documentation was copied.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   128
      { "pkg/PublicChild.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
        "Description copied from"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   130
      { "pkg/PublicInterface.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
        "Description copied from"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
      // Don't extend private classes or interfaces
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   133
      { "pkg/PublicChild.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
        "PrivateParent"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   135
      { "pkg/PublicInterface.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
        "PrivateInterface"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   137
      { "pkg/PublicChild.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
        "PrivateInterface"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   139
      { "pkg/PublicInterface.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
        "All Superinterfaces"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
      // Make inherited constant are documented correctly.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   142
      { "constant-values.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
        "PrivateInterface"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
        //Do not inherit private interface method with generic parameters.
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
        //This method has been implemented.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   147
        { "pkg2/C.html",
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21008
diff changeset
   148
            "<span class=\"memberNameLink\"><a href=\"../pkg2/I.html#hello-T-\">hello</a></span>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
    };
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
    // Test output when -private flag is used.
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
    private static final String[][] TEST2 = {
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
        // Field inheritence from non-public superclass.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   154
        { "pkg/PublicChild.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   155
            "Fields inherited from class&nbsp;pkg." +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   156
            "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   157
            "PrivateParent</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   159
        { "pkg/PublicChild.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   160
            "<a href=\"../pkg/PrivateParent.html#fieldInheritedFromParent\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   161
                "fieldInheritedFromParent</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
        // Field inheritence from non-public superinterface.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   164
        { "pkg/PublicInterface.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   165
            "Fields inherited from interface&nbsp;pkg." +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   166
            "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   167
            "PrivateInterface</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   169
        { "pkg/PublicInterface.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   170
            "<a href=\"../pkg/PrivateInterface.html#fieldInheritedFromInterface\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   171
                "fieldInheritedFromInterface</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
        // Method inheritence from non-public superclass.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   174
        { "pkg/PublicChild.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   175
            "Methods inherited from class&nbsp;pkg." +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   176
            "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   177
            "PrivateParent</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   179
        { "pkg/PublicChild.html",
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 20257
diff changeset
   180
            "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent-int-\">" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   181
                "methodInheritedFromParent</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
        // Should document that a method overrides method from private class.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   184
       { "pkg/PublicChild.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   185
            "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 20257
diff changeset
   186
            "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   187
            "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   188
            "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   189
            "PrivateParent</a></code></dd>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
       // Should document that a method is specified by private interface.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   191
       { "pkg/PublicChild.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   192
            "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n" +
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 20257
diff changeset
   193
            "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   194
            "methodInterface</a></code>&nbsp;in interface&nbsp;<code>" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   195
            "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   196
            "PrivateInterface</a></code></dd>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
       // Method inheritence from non-public superinterface.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   198
       { "pkg/PublicInterface.html",
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   199
            "Methods inherited from interface&nbsp;pkg." +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   200
            "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   201
            "PrivateInterface</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   203
        { "pkg/PrivateInterface.html",
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 20257
diff changeset
   204
            "<a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   205
                "methodInterface</a>"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
      // Should mention that any documentation was copied.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   208
      { "pkg/PublicChild.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
        "Description copied from"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
      // Extend documented private classes or interfaces
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   211
      { "pkg/PublicChild.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
        "extends"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   213
      { "pkg/PublicInterface.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
        "extends"},
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   215
      { "pkg/PublicInterface.html",
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
        "All Superinterfaces"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
      //Make sure implemented interfaces from private superclass are inherited
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   219
      { "pkg/PublicInterface.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   220
        "<dl>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   221
        "<dt>All Known Implementing Classes:</dt>\n" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   222
        "<dd><a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   223
        "PrivateParent</a>, " +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   224
        "<a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild" +
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   225
        "</a></dd>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   226
        "</dl>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   228
      { "pkg/PublicChild.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   229
        "<dl>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   230
        "<dt>All Implemented Interfaces:</dt>\n" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   231
        "<dd><a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   232
        "PrivateInterface</a>, " +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   233
        "<a href=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">" +
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   234
        "PublicInterface</a></dd>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   235
        "</dl>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
      //Since private flag is used, we can document that private interface method
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
      //with generic parameters has been implemented.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   239
      { "pkg2/C.html",
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21008
diff changeset
   240
            "<span class=\"descfrmTypeLabel\">Description copied from interface:&nbsp;<code>" +
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 20257
diff changeset
   241
            "<a href=\"../pkg2/I.html#hello-T-\">I</a></code></span>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   243
      { "pkg2/C.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23139
diff changeset
   244
            "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n" +
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 20257
diff changeset
   245
            "<dd><code><a href=\"../pkg2/I.html#hello-T-\">hello</a></code>" +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   246
            "&nbsp;in interface&nbsp;<code>" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   247
            "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   248
            "&lt;java.lang.String&gt;</code></dd>"},
18651
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
   249
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
   250
      //Make sure when no modifier appear in the class signature, the
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
   251
      //signature is displayed correctly without extra space at the beginning.
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   252
      { "pkg/PrivateParent.html",
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21008
diff changeset
   253
            "<pre>class <span class=\"typeNameLabel\">PrivateParent</span>"},
18651
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
   254
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   255
      { "pkg/PublicChild.html",
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21008
diff changeset
   256
            "<pre>public class <span class=\"typeNameLabel\">PublicChild</span>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
    };
18651
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
   258
    private static final String[][] NEGATED_TEST2 = {
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   259
        { "pkg/PrivateParent.html",
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21008
diff changeset
   260
            "<pre> class <span class=\"typeNameLabel\">PrivateParent</span>"},
18651
439898801aa4 8014017: extra space in javadoc class heading
bpatel
parents: 7681
diff changeset
   261
    };
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
     * The entry point of the test.
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
     * @param args the array of command line arguments.
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
    public static void main(String[] args) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
        TestPrivateClasses tester = new TestPrivateClasses();
24065
fc4022e50129 8041150: Avoid silly use of static methods in JavadocTester
jjg
parents: 23971
diff changeset
   269
        tester.run(ARGS1, TEST1, NEGATED_TEST1);
fc4022e50129 8041150: Avoid silly use of static methods in JavadocTester
jjg
parents: 23971
diff changeset
   270
        tester.run(ARGS2, TEST2, NEGATED_TEST2);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
        tester.printSummary();
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
}