langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java
author bpatel
Thu, 08 Jan 2009 16:26:59 -0800
changeset 1787 1aa079321cd2
parent 10 06bc494ca11e
child 2216 b124d5c924eb
permissions -rw-r--r--
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
 * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
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
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
 * have any questions.
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
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
 * @bug      4780441 4874845 4978816
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.
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 * @author   jamieh
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 * @library  ../lib/
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 * @build    JavadocTester
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 * @build    TestPrivateClasses
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 * @run main TestPrivateClasses
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
public class TestPrivateClasses extends JavadocTester {
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
    //Test information.
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
    private static final String BUG_ID = "4780441-4874845-4978816";
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
    //Javadoc arguments.
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
    private static final String[] ARGS1 = new String[] {
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
        "-d", BUG_ID + "-1", "-sourcepath", SRC_DIR, "-source", "1.5", "pkg", "pkg2"
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
    };
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
    private static final String[] ARGS2 = new String[] {
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
        "-d", BUG_ID + "-2", "-sourcepath", SRC_DIR, "-private",
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
            "-source", "1.5", "pkg", "pkg2"
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
    };
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
    // Test output when -private flag is not used.
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
    private static final String[][] TEST1 = {
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
        // Field inheritence from non-public superclass.
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
        {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
            "<A HREF=\"../pkg/PublicChild.html#fieldInheritedFromParent\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
                "fieldInheritedFromParent</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
        // Method inheritence from non-public superclass.
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
        {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
            "<A HREF=\"../pkg/PublicChild.html#methodInheritedFromParent(int)\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
                "methodInheritedFromParent</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
        // Field inheritence from non-public superinterface.
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
        {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
            "<A HREF=\"../pkg/PublicInterface.html#fieldInheritedFromInterface\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
                "fieldInheritedFromInterface</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
        // Method inheritence from non-public superinterface.
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
        {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
            "<A HREF=\"../pkg/PublicInterface.html#methodInterface(int)\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
                "methodInterface</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
        // private class does not show up in tree
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
        {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
            "<PRE>" + NL +
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
                "java.lang.Object" + NL +
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
                "  <IMG SRC=\"../resources/inherit.gif\" " +
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
    88
                "ALT=\"extended by \"><STRONG>pkg.PublicChild</STRONG>" + NL +
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
            "</PRE>"
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
        // Method is documented as though it is declared in the inheriting method.
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
        {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
    94
            "public void <STRONG>methodInheritedFromParent</STRONG>(int&nbsp;p1)"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
        //Make sure implemented interfaces from private superclass are inherited
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
        {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
    99
            "<STRONG>All Known Implementing Classes:</STRONG> <DD><A HREF=\"../pkg/PublicChild.html\" " +
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
            "title=\"class in pkg\">PublicChild</A>"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
        {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   103
            "<STRONG>All Implemented Interfaces:</STRONG> <DD><A HREF=\"../pkg/PublicInterface.html\" " +
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
            "title=\"interface in pkg\">PublicInterface</A>"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
        //Generic interface method test.
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
        {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
            "This comment should get copied to the implementing class"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
    };
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
    private static final String[][] NEGATED_TEST1 = {
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
       // Should not document that a method overrides method from private class.
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
      {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   113
        "<STRONG>Overrides:</STRONG>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
      // Should not document that a method specified by private interface.
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
      {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   116
        "<STRONG>Specified by:</STRONG>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
      {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   118
        "<STRONG>Specified by:</STRONG>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
      // Should not mention that any documentation was copied.
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
      {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
        "Description copied from"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
      {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
        "Description copied from"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
      // Don't extend private classes or interfaces
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
      {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
        "PrivateParent"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
      {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
        "PrivateInterface"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
      {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
        "PrivateInterface"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
      {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
        "All Superinterfaces"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
      // Make inherited constant are documented correctly.
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
      {BUG_ID + "-1" + FS + "constant-values.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
        "PrivateInterface"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
        //Do not inherit private interface method with generic parameters.
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
        //This method has been implemented.
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
        {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   140
            "<STRONG><A HREF=\"../pkg2/I.html#hello(T)\">hello</A></STRONG>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
    };
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
    // Test output when -private flag is used.
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
    private static final String[][] TEST2 = {
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
        // Field inheritence from non-public superclass.
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
            "Fields inherited from class " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
            "pkg.<A HREF=\"../pkg/PrivateParent.html\" " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
            "title=\"class in pkg\">PrivateParent</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
            "<A HREF=\"../pkg/PrivateParent.html#fieldInheritedFromParent\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
                "fieldInheritedFromParent</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
        // Field inheritence from non-public superinterface.
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
            "Fields inherited from interface " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
            "pkg.<A HREF=\"../pkg/PrivateInterface.html\" " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
            "title=\"interface in pkg\">PrivateInterface</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
            "<A HREF=\"../pkg/PrivateInterface.html#fieldInheritedFromInterface\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
                "fieldInheritedFromInterface</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
        // Method inheritence from non-public superclass.
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
            "Methods inherited from class " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
            "pkg.<A HREF=\"../pkg/PrivateParent.html\" " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
            "title=\"class in pkg\">PrivateParent</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
            "<A HREF=\"../pkg/PrivateParent.html#methodInheritedFromParent(int)\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
                "methodInheritedFromParent</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
        // Should document that a method overrides method from private class.
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
       {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   177
            "<STRONG>Overrides:</STRONG><DD><CODE>" +
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
            "<A HREF=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[], int, T, V, java.util.List)\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
            "methodOverridenFromParent</A></CODE> in class <CODE>" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
            "<A HREF=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
            "PrivateParent</A></CODE></DL>"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
       // Should document that a method is specified by private interface.
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
       {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   184
            "<STRONG>Specified by:</STRONG><DD><CODE>" +
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
            "<A HREF=\"../pkg/PrivateInterface.html#methodInterface(int)\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
            "methodInterface</A></CODE> in interface <CODE>" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
            "<A HREF=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
            "PrivateInterface</A></CODE></DL>" + NL + "</DD>"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
       // Method inheritence from non-public superinterface.
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
       {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
            "Methods inherited from interface " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
            "pkg.<A HREF=\"../pkg/PrivateInterface.html\" " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
            "title=\"interface in pkg\">PrivateInterface</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
        {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
            "<A HREF=\"../pkg/PrivateInterface.html#methodInterface(int)\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
                "methodInterface</A>"
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
        },
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
      // Should mention that any documentation was copied.
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
      {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
        "Description copied from"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
      // Extend documented private classes or interfaces
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
      {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
        "extends"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
      {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
        "extends"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
      {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
        "All Superinterfaces"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
      //Make sure implemented interfaces from private superclass are inherited
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
      {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   212
        "<STRONG>All Known Implementing Classes:</STRONG> <DD><A HREF=\"../pkg/PrivateParent.html\" " +
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
        "title=\"class in pkg\">PrivateParent</A>, " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
        "<A HREF=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</A>"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
      {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   217
        "<STRONG>All Implemented Interfaces:</STRONG> <DD><A HREF=\"../pkg/PrivateInterface.html\" " +
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
        "title=\"interface in pkg\">PrivateInterface</A>, " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
        "<A HREF=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">" +
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
        "PublicInterface</A>"},
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
      //Since private flag is used, we can document that private interface method
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
      //with generic parameters has been implemented.
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
      {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   225
            "<STRONG>Description copied from interface: " +
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   226
            "<CODE><A HREF=\"../pkg2/I.html#hello(T)\">I</A></CODE></STRONG>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
      {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   229
            "<STRONG>Specified by:</STRONG><DD><CODE><A HREF=\"../pkg2/I.html#hello(T)\">" +
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   230
            "hello</A></CODE> in interface <CODE><A HREF=\"../pkg2/I.html\" " +
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   231
            "title=\"interface in pkg2\">I</A>"},
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
    };
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
    private static final String[][] NEGATED_TEST2 = NO_TEST;
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
     * The entry point of the test.
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
     * @param args the array of command line arguments.
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
    public static void main(String[] args) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
        TestPrivateClasses tester = new TestPrivateClasses();
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
        run(tester, ARGS1, TEST1, NEGATED_TEST1);
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
        run(tester, ARGS2, TEST2, NEGATED_TEST2);
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
        tester.printSummary();
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
    public String getBugId() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
        return BUG_ID;
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
    public String getBugName() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
        return getClass().getName();
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
}