Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/langtools/jdk/javadoc/doclet/testAbstractMethod/TestAbstractMethod.java
40971 views
1
/*
2
* Copyright (c) 2012, 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 8004891 8184205
27
* @summary Make sure that the abstract method is identified correctly
28
* if the abstract modifier is present explicitly or implicitly.
29
* @library ../../lib
30
* @modules jdk.javadoc/jdk.javadoc.internal.tool
31
* @build javadoc.tester.*
32
* @run main TestAbstractMethod
33
*/
34
35
import javadoc.tester.JavadocTester;
36
37
public class TestAbstractMethod extends JavadocTester {
38
39
public static void main(String... args) throws Exception {
40
TestAbstractMethod tester = new TestAbstractMethod();
41
tester.runTests();
42
}
43
44
@Test
45
public void test() {
46
javadoc("-d", "out",
47
"-sourcepath", testSrc,
48
"pkg");
49
checkExit(Exit.OK);
50
51
checkOutput("pkg/A.html", true,
52
"""
53
<div class="col-first even-row-color method-summary-table method-summary-table-t\
54
ab2 method-summary-table-tab5"><code>default void</code></div>""",
55
"""
56
<div class="table-tabs" role="tablist" aria-orientation="horizontal">\
57
<button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-cont\
58
rols="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" o\
59
nclick="show('method-summary-table', 'method-summary-table', 3)" class="active-t\
60
able-tab">All Methods</button>\
61
<button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-con\
62
trols="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)"\
63
onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="t\
64
able-tab">Instance Methods</button>\
65
<button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-con\
66
trols="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)"\
67
onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="t\
68
able-tab">Abstract Methods</button>\
69
<button id="method-summary-table-tab5" role="tab" aria-selected="false" aria-con\
70
trols="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)"\
71
onclick="show('method-summary-table', 'method-summary-table-tab5', 3)" class="t\
72
able-tab">Default Methods</button>\
73
</div>""");
74
75
checkOutput("pkg/B.html", true,
76
"""
77
<div class="table-tabs" role="tablist" aria-orientation="horizontal">\
78
<button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-cont\
79
rols="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" o\
80
nclick="show('method-summary-table', 'method-summary-table', 3)" class="active-t\
81
able-tab">All Methods</button>\
82
<button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-con\
83
trols="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)"\
84
onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="t\
85
able-tab">Instance Methods</button>\
86
<button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-con\
87
trols="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)"\
88
onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="t\
89
able-tab">Abstract Methods</button>\
90
<button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-con\
91
trols="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)"\
92
onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="t\
93
able-tab">Concrete Methods</button>\
94
</div>""",
95
"""
96
<div class="col-first even-row-color method-summary-table method-summary-table-t\
97
ab2 method-summary-table-tab3"><code>abstract void</code></div>""");
98
99
checkOutput("pkg/C.html", true,
100
"""
101
<div class="table-tabs" role="tablist" aria-orientation="horizontal">\
102
<button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-cont\
103
rols="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" o\
104
nclick="show('method-summary-table', 'method-summary-table', 3)" class="active-t\
105
able-tab">All Methods</button>\
106
<button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-con\
107
trols="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)"\
108
onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="t\
109
able-tab">Instance Methods</button>\
110
<button id="method-summary-table-tab5" role="tab" aria-selected="false" aria-con\
111
trols="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)"\
112
onclick="show('method-summary-table', 'method-summary-table-tab5', 3)" class="t\
113
able-tab">Default Methods</button>\
114
</div>""");
115
116
checkOutput("pkg/A.html", false,
117
"""
118
<div class="col-first even-row-color method-summary-table-tab2 method-summary-ta\
119
ble method-summary-table-tab3"><code>abstract void</code></div>""");
120
121
checkOutput("pkg/B.html", false,
122
"""
123
Default Methods""",
124
"""
125
<div class="col-first even-row-color method-summary-table-tab2 method-summary-ta\
126
ble-tab5 method-summary-table"><code>default void</code></div>""");
127
128
checkOutput("pkg/C.html", false,
129
"""
130
Abstract Methods""");
131
}
132
}
133
134