Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/langtools/jdk/javadoc/doclet/constantValues/TestConstantValuesDriver.java
40971 views
1
/*
2
* Copyright (c) 2002, 2020, 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 4504730 4526070 5077317 8162363
27
* @summary Test the generation of constant-values.html.
28
* @library ../../lib
29
* @modules jdk.javadoc/jdk.javadoc.internal.tool
30
* @build javadoc.tester.*
31
* @run main TestConstantValuesDriver
32
*/
33
import javadoc.tester.JavadocTester;
34
35
public class TestConstantValuesDriver extends JavadocTester {
36
37
public static void main(String... args) throws Exception {
38
TestConstantValuesDriver tester = new TestConstantValuesDriver();
39
tester.runTests();
40
}
41
42
@Test
43
public void test() {
44
javadoc("-d", "out",
45
testSrc("TestConstantValues.java"),
46
testSrc("TestConstantValues2.java"),
47
testSrc("A.java"));
48
checkExit(Exit.OK);
49
50
checkOutput("constant-values.html", true,
51
"TEST1PASSES",
52
"TEST2PASSES",
53
"TEST3PASSES",
54
"TEST4PASSES",
55
"""
56
<code>"&lt;Hello World&gt;"</code>""",
57
"""
58
<code id="TestConstantValues.BYTE_MAX_VALUE">public&nbsp;static&nbsp;final&nbsp;byte</code></div>
59
<div class="col-second even-row-color"><code><a href="TestConstantValues.html#BYTE_MAX_VALUE">BYTE_MAX_VALUE</a></code></div>
60
<div class="col-last even-row-color"><code>0x7f</code></div>""",
61
"""
62
<code id="TestConstantValues.BYTE_MIN_VALUE">public&nbsp;static&nbsp;final&nbsp;byte</code></div>
63
<div class="col-second odd-row-color"><code><a href="TestConstantValues.html#BYTE_MIN_VALUE">BYTE_MIN_VALUE</a></code></div>
64
<div class="col-last odd-row-color"><code>0x81</code></div>""",
65
"""
66
<code id="TestConstantValues.CHAR_MAX_VALUE">public&nbsp;static&nbsp;final&nbsp;char</code></div>
67
<div class="col-second even-row-color"><code><a href="TestConstantValues.html#CHAR_MAX_VALUE">CHAR_MAX_VALUE</a></code></div>
68
<div class="col-last even-row-color"><code>'\\uffff'</code></div>""",
69
"""
70
<code id="TestConstantValues.DOUBLE_MAX_VALUE">public&nbsp;static&nbsp;final&nbsp;double</code></div>""",
71
"""
72
<div class="col-second odd-row-color"><code><a href="TestConstantValues.html#DOUBLE_MAX_VALUE">\
73
DOUBLE_MAX_VALUE</a></code></div>
74
<div class="col-last odd-row-color"><code>1.7976931348623157E308</code></div>""",
75
"""
76
<code id="TestConstantValues.DOUBLE_MIN_VALUE">public&nbsp;static&nbsp;final&nbsp;double</code></div>
77
<div class="col-second even-row-color"><code><a href="TestConstantValues.html#DOUBLE_MIN_VALUE">\
78
DOUBLE_MIN_VALUE</a></code></div>""",
79
"""
80
<code id="TestConstantValues.GOODBYE">public&nbsp;static&nbsp;final&nbsp;boolean</code></div>
81
<div class="col-second odd-row-color"><code><a href="TestConstantValues.html#GOODBYE">GOODBYE</a></code></div>""",
82
"""
83
<code id="TestConstantValues.HELLO">public&nbsp;static&nbsp;final&nbsp;boolean</code></div>
84
<div class="col-second even-row-color"><code><a href="TestConstantValues.html#HELLO">HELLO</a></code></div>
85
<div class="col-last even-row-color"><code>true</code></div>"""
86
);
87
}
88
}
89
90