Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/langtools/jdk/javadoc/tool/sampleapi/SampleApiTest.java
40971 views
1
/*
2
* Copyright (c) 2015, 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 8130880
27
* @library lib
28
* @modules jdk.compiler/com.sun.tools.javac.api
29
* jdk.compiler/com.sun.tools.javac.code
30
* jdk.compiler/com.sun.tools.javac.parser
31
* jdk.compiler/com.sun.tools.javac.tree
32
* jdk.compiler/com.sun.tools.javac.util
33
* jdk.javadoc/jdk.javadoc.internal.tool
34
* @run main SampleApiTest
35
*/
36
import java.io.File;
37
38
import jdk.javadoc.internal.tool.Main;
39
import sampleapi.SampleApiDefaultRunner;
40
41
public class SampleApiTest {
42
43
public static void main(String... args) throws Exception {
44
45
// generate
46
SampleApiDefaultRunner.execute(
47
new String[] {
48
"-o=out/src",
49
"-r=" + System.getProperty("test.src") + "/res"
50
});
51
52
// html5 / unnamed modules
53
System.err.println(">> HTML5, unnamed modules");
54
int res = Main.execute(
55
new String[] {
56
"-d", "out/doc.html5.unnamed",
57
"-verbose",
58
"-private",
59
"-use",
60
"-splitindex",
61
"-linksource",
62
"-html5",
63
"-javafx",
64
"-windowtitle", "SampleAPI",
65
"-overview", "overview.html",
66
"-sourcepath", "out/src" + File.pathSeparator + "out/src/sat.sampleapi",
67
"sampleapi.simple",
68
"sampleapi.simple.sub",
69
"sampleapi.tiny",
70
"sampleapi.tiny.sub",
71
"sampleapi.fx"
72
});
73
74
if (res > 0)
75
throw new Exception("exit status is non-zero: " + res + " for HTML5.");
76
}
77
}
78
79