author | bpatel |
Thu, 14 Nov 2013 13:47:38 -0800 | |
changeset 21717 | 11ba59c9bbb5 |
child 23794 | 9437acfa99e9 |
permissions | -rw-r--r-- |
21717
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
1 |
/* |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
2 |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
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 |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
26 |
* @bug 8025524 |
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 |
private static final String BUG_ID = "8025524"; |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
37 |
|
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
38 |
//Input for string search tests. |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
39 |
private static final String[][] TEST = { |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
40 |
{BUG_ID + FS + "pkg1" + FS + "Outer.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
41 |
"<a href=\"../pkg1/Outer.html#Outer--\">Outer</a></span>()" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
42 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
43 |
{BUG_ID + FS + "pkg1" + FS + "Outer.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
44 |
"<a name=\"Outer--\">" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
45 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
46 |
{BUG_ID + FS + "pkg1" + FS + "Outer.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
47 |
"<a href=\"../pkg1/Outer.html#Outer-int-\">Outer</a></span>(int i)" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
48 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
49 |
{BUG_ID + FS + "pkg1" + FS + "Outer.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
50 |
"<a name=\"Outer-int-\">" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
51 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
52 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
53 |
"<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
|
54 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
55 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
56 |
"<a name=\"Inner--\">" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
57 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
58 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
59 |
"<a href=\"../pkg1/Outer.Inner.html#Inner-int-\">Inner</a></span>(int i)" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
60 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
61 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
62 |
"<a name=\"Inner-int-\">" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
63 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
64 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.NestedInner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
65 |
"<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
|
66 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
67 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.NestedInner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
68 |
"<a name=\"NestedInner--\">" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
69 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
70 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.NestedInner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
71 |
"<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\">NestedInner</a></span>(int i)" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
72 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
73 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.NestedInner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
74 |
"<a name=\"NestedInner-int-\">" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
75 |
} |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
76 |
}; |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
77 |
|
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
78 |
private static final String[][] NEGATED_TEST = { |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
79 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
80 |
"Outer.Inner--" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
81 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
82 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
83 |
"Outer.Inner-int-" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
84 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
85 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.NestedInner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
86 |
"Outer.Inner.NestedInner--" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
87 |
}, |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
88 |
{BUG_ID + FS + "pkg1" + FS + "Outer.Inner.NestedInner.html", |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
89 |
"Outer.Inner.NestedInner-int-" |
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 |
}; |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
92 |
|
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
93 |
private static final String[] ARGS = new String[] { |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
94 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1" |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
95 |
}; |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
96 |
|
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
97 |
/** |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
98 |
* The entry point of the test. |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
99 |
* @param args the array of command line arguments. |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
100 |
*/ |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
101 |
public static void main(String[] args) throws Exception { |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
102 |
TestConstructors tester = new TestConstructors(); |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
103 |
run(tester, ARGS, TEST, NEGATED_TEST); |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
104 |
tester.printSummary(); |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
105 |
} |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
106 |
|
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
107 |
/** |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
108 |
* {@inheritDoc} |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
109 |
*/ |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
110 |
public String getBugId() { |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
111 |
return BUG_ID; |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
112 |
} |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
113 |
|
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
114 |
/** |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
115 |
* {@inheritDoc} |
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 |
public String getBugName() { |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
118 |
return getClass().getName(); |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
119 |
} |
11ba59c9bbb5
8025524: javadoc does not correctly locate constructors for nested classes
bpatel
parents:
diff
changeset
|
120 |
} |