langtools/test/com/sun/javadoc/testConstructors/TestConstructors.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:
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
     1
/*
23794
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
     2
 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
     4
 *
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
     7
 * published by the Free Software Foundation.
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
     8
 *
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    13
 * accompanied this code).
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    14
 *
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    18
 *
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    21
 * questions.
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    22
 */
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    23
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    24
/*
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    25
 * @test
23794
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
    26
 * @bug 8025524 8031625
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    27
 * @summary Test for constructor name which should be a non-qualified name.
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    28
 * @author Bhavesh Patel
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    29
 * @library ../lib/
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    30
 * @build JavadocTester TestConstructors
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    31
 * @run main TestConstructors
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    32
 */
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    33
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    34
public class TestConstructors extends JavadocTester {
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    35
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    36
    //Input for string search tests.
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    37
    private static final String[][] TEST = {
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    38
        { "pkg1/Outer.html",
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23794
diff changeset
    39
            "<dt><span class=\"seeLabel\">See Also:</span></dt>\n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23794
diff changeset
    40
            "<dd><a href=\"../pkg1/Outer.Inner.html#Inner--\"><code>Inner()</code></a>, \n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23794
diff changeset
    41
            "<a href=\"../pkg1/Outer.Inner.html#Inner-int-\"><code>Inner(int)</code></a>, \n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23794
diff changeset
    42
            "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner--\"><code>NestedInner()</code></a>, \n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23794
diff changeset
    43
            "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>NestedInner(int)</code></a>, \n" +
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 23794
diff changeset
    44
            "<a href=\"../pkg1/Outer.html#Outer--\"><code>Outer()</code></a>, \n" +
23794
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
    45
            "<a href=\"../pkg1/Outer.html#Outer-int-\"><code>Outer(int)</code></a>"
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
    46
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    47
        { "pkg1/Outer.html",
23794
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
    48
            "Link: <a href=\"../pkg1/Outer.Inner.html#Inner--\"><code>Inner()</code></a>, " +
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
    49
            "<a href=\"../pkg1/Outer.html#Outer-int-\"><code>Outer(int)</code></a>, " +
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
    50
            "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>" +
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
    51
            "NestedInner(int)</code></a>"
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
    52
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    53
        { "pkg1/Outer.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    54
            "<a href=\"../pkg1/Outer.html#Outer--\">Outer</a></span>()"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    55
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    56
        { "pkg1/Outer.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    57
            "<a name=\"Outer--\">"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    58
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    59
        { "pkg1/Outer.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    60
            "<a href=\"../pkg1/Outer.html#Outer-int-\">Outer</a></span>(int&nbsp;i)"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    61
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    62
        { "pkg1/Outer.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    63
            "<a name=\"Outer-int-\">"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    64
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    65
        { "pkg1/Outer.Inner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    66
            "<a href=\"../pkg1/Outer.Inner.html#Inner--\">Inner</a></span>()"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    67
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    68
        { "pkg1/Outer.Inner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    69
            "<a name=\"Inner--\">"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    70
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    71
        { "pkg1/Outer.Inner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    72
            "<a href=\"../pkg1/Outer.Inner.html#Inner-int-\">Inner</a></span>(int&nbsp;i)"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    73
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    74
        { "pkg1/Outer.Inner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    75
            "<a name=\"Inner-int-\">"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    76
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    77
        { "pkg1/Outer.Inner.NestedInner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    78
            "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner--\">NestedInner</a></span>()"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    79
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    80
        { "pkg1/Outer.Inner.NestedInner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    81
            "<a name=\"NestedInner--\">"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    82
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    83
        { "pkg1/Outer.Inner.NestedInner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    84
            "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\">NestedInner</a></span>(int&nbsp;i)"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    85
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    86
        { "pkg1/Outer.Inner.NestedInner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    87
            "<a name=\"NestedInner-int-\">"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    88
        }
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    89
    };
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    90
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    91
    private static final String[][] NEGATED_TEST = {
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    92
        { "pkg1/Outer.Inner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    93
            "Outer.Inner--"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    94
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    95
        { "pkg1/Outer.Inner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    96
            "Outer.Inner-int-"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    97
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    98
        { "pkg1/Outer.Inner.NestedInner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
    99
            "Outer.Inner.NestedInner--"
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   100
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   101
        { "pkg1/Outer.Inner.NestedInner.html",
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   102
            "Outer.Inner.NestedInner-int-"
23794
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
   103
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   104
        { "pkg1/Outer.html",
23794
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
   105
            "<a href=\"../pkg1/Outer.Inner.html#Outer.Inner--\"><code>Outer.Inner()</code></a>"
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
   106
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   107
        { "pkg1/Outer.html",
23794
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
   108
            "<a href=\"../pkg1/Outer.Inner.html#Outer.Inner-int-\"><code>Outer.Inner(int)</code></a>"
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
   109
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   110
        { "pkg1/Outer.html",
23794
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
   111
            "<a href=\"../pkg1/Outer.Inner.NestedInner.html#Outer.Inner.NestedInner--\"><code>Outer.Inner.NestedInner()</code></a>"
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
   112
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   113
        { "pkg1/Outer.html",
23794
9437acfa99e9 8031625: javadoc problems referencing inner class constructors
bpatel
parents: 21717
diff changeset
   114
            "<a href=\"../pkg1/Outer.Inner.NestedInner.html#Outer.Inner.NestedInner-int-\"><code>Outer.Inner.NestedInner(int)</code></a>"
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   115
        }
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   116
    };
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   117
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   118
    private static final String[] ARGS = new String[] {
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
   119
        "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg1"
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   120
    };
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   121
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   122
    /**
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   123
     * The entry point of the test.
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   124
     * @param args the array of command line arguments.
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   125
     */
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   126
    public static void main(String[] args) throws Exception {
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   127
        TestConstructors tester = new TestConstructors();
24065
fc4022e50129 8041150: Avoid silly use of static methods in JavadocTester
jjg
parents: 23971
diff changeset
   128
        tester.run(ARGS, TEST, NEGATED_TEST);
21717
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   129
        tester.printSummary();
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   130
    }
11ba59c9bbb5 8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff changeset
   131
}