Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/langtools/jdk/javadoc/doclet/AccessSummary/AccessSummary.java
40971 views
1
/*
2
* Copyright (c) 2002, 2019, 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 4637604 4775148 8183037 8182765 8196202
27
* @summary Test the tables for summary attribute
28
* @library ../../lib
29
* @modules jdk.javadoc/jdk.javadoc.internal.tool
30
* @build javadoc.tester.*
31
* @run main AccessSummary
32
*/
33
34
import javadoc.tester.JavadocTester;
35
36
public class AccessSummary extends JavadocTester {
37
/**
38
* The entry point of the test.
39
* @param args the array of command line arguments.
40
* @throws Exception if the test fails
41
*/
42
public static void main(String... args) throws Exception {
43
AccessSummary tester = new AccessSummary();
44
tester.runTests();
45
}
46
47
@Test
48
public void testAccessSummary() {
49
javadoc("-d", "out",
50
"-sourcepath", testSrc,
51
"p1", "p2");
52
checkExit(Exit.OK);
53
checkSummary(false);
54
}
55
56
void checkSummary(boolean found) {
57
checkOutput("index.html", found,
58
"""
59
summary="Package Summary table, listing packages, and an explanation\"""");
60
61
// Test that the summary attribute appears or not
62
checkOutput("p1/C1.html", found,
63
"""
64
summary="Constructor Summary table, listing constructors, and an explanation\"""");
65
66
// Test that the summary attribute appears or not
67
checkOutput("constant-values.html", found,
68
"""
69
summary="Constant Field Values table, listing constant fields, and values\"""");
70
}
71
}
72
73