Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/langtools/jdk/javadoc/doclet/testConstructors/TestConstructors.java
40971 views
1
/*
2
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*/
23
24
/*
25
* @test
26
* @bug 8025524 8031625 8081854 8175200 8186332 8182765
27
* @summary Test for constructor name which should be a non-qualified name.
28
* @library ../../lib
29
* @modules jdk.javadoc/jdk.javadoc.internal.tool
30
* @build javadoc.tester.*
31
* @run main TestConstructors
32
*/
33
34
import javadoc.tester.JavadocTester;
35
36
public class TestConstructors extends JavadocTester {
37
38
public static void main(String... args) throws Exception {
39
TestConstructors tester = new TestConstructors();
40
tester.runTests();
41
}
42
43
@Test
44
public void test() {
45
javadoc("-d", "out",
46
"-sourcepath", testSrc,
47
"pkg1");
48
checkExit(Exit.OK);
49
50
checkOutput("pkg1/Outer.html", true,
51
"""
52
<dt>See Also:</dt>
53
<dd>
54
<ul class="see-list">
55
<li><a href="Outer.Inner.html#%3Cinit%3E()"><code>Inner()</code></a></li>
56
<li><a href="Outer.Inner.html#%3Cinit%3E(int)"><code>Inner(int)</code></a></li>
57
<li><a href="Outer.Inner.NestedInner.html#%3Cinit%3E()"><code>NestedInner()</code></a></li>
58
<li><a href="Outer.Inner.NestedInner.html#%3Cinit%3E(int)"><code>NestedInner(int)</code></a></li>
59
<li><a href="#%3Cinit%3E()"><code>Outer()</code></a></li>
60
<li><a href="#%3Cinit%3E(int)"><code>Outer(int)</code></a></li>
61
</ul>
62
</dd>""",
63
"""
64
Link: <a href="Outer.Inner.html#%3Cinit%3E()"><code>Inner()</code></a>, <a href=\
65
"#%3Cinit%3E(int)"><code>Outer(int)</code></a>, <a href="Outer.Inner.NestedInner\
66
.html#%3Cinit%3E(int)"><code>NestedInner(int)</code></a>""",
67
"""
68
<a href="#%3Cinit%3E()" class="member-name-link">Outer</a>()""",
69
"""
70
<section class="detail" id="&lt;init&gt;()">""",
71
"""
72
<a href="#%3Cinit%3E(int)" class="member-name-link">Outer</a><wbr>(int&nbsp;i)""",
73
"""
74
<section class="detail" id="&lt;init&gt;(int)">""");
75
76
checkOutput("pkg1/Outer.Inner.html", true,
77
"""
78
<a href="#%3Cinit%3E()" class="member-name-link">Inner</a>()""",
79
"""
80
<section class="detail" id="&lt;init&gt;()">""",
81
"""
82
<a href="#%3Cinit%3E(int)" class="member-name-link">Inner</a><wbr>(int&nbsp;i)""",
83
"""
84
<section class="detail" id="&lt;init&gt;(int)">""");
85
86
checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
87
"""
88
<a href="#%3Cinit%3E()" class="member-name-link">NestedInner</a>()""",
89
"""
90
<section class="detail" id="&lt;init&gt;()">""",
91
"""
92
<a href="#%3Cinit%3E(int)" class="member-name-link">NestedInner</a><wbr>(int&nbsp;i)""",
93
"""
94
<section class="detail" id="&lt;init&gt;(int)">""");
95
96
checkOutput("pkg1/Outer.Inner.html", false,
97
"Outer.Inner()",
98
"Outer.Inner(int)");
99
100
checkOutput("pkg1/Outer.Inner.NestedInner.html", false,
101
"Outer.Inner.NestedInner()",
102
"Outer.Inner.NestedInner(int)");
103
104
checkOutput("pkg1/Outer.html", false,
105
"""
106
<a href="Outer.Inner.html#Outer.Inner()"><code>Outer.Inner()</code></a>""",
107
"""
108
<a href="Outer.Inner.html#Outer.Inner(int)"><code>Outer.Inner(int)</code></a>""",
109
"""
110
<a href="Outer.Inner.NestedInner.html#Outer.Inner.NestedInner()"><code>Outer.Inner.NestedInner()</code></a>""",
111
"""
112
<a href="Outer.Inner.NestedInner.html#Outer.Inner.NestedInner(int)"><code>Outer.Inner.NestedInner(int)</code></a>""");
113
}
114
}
115
116