Path: blob/master/test/langtools/jdk/javadoc/tool/sampleapi/SampleApiTest.java
40971 views
/*1* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/*24* @test25* @bug 813088026* @library lib27* @modules jdk.compiler/com.sun.tools.javac.api28* jdk.compiler/com.sun.tools.javac.code29* jdk.compiler/com.sun.tools.javac.parser30* jdk.compiler/com.sun.tools.javac.tree31* jdk.compiler/com.sun.tools.javac.util32* jdk.javadoc/jdk.javadoc.internal.tool33* @run main SampleApiTest34*/35import java.io.File;3637import jdk.javadoc.internal.tool.Main;38import sampleapi.SampleApiDefaultRunner;3940public class SampleApiTest {4142public static void main(String... args) throws Exception {4344// generate45SampleApiDefaultRunner.execute(46new String[] {47"-o=out/src",48"-r=" + System.getProperty("test.src") + "/res"49});5051// html5 / unnamed modules52System.err.println(">> HTML5, unnamed modules");53int res = Main.execute(54new String[] {55"-d", "out/doc.html5.unnamed",56"-verbose",57"-private",58"-use",59"-splitindex",60"-linksource",61"-html5",62"-javafx",63"-windowtitle", "SampleAPI",64"-overview", "overview.html",65"-sourcepath", "out/src" + File.pathSeparator + "out/src/sat.sampleapi",66"sampleapi.simple",67"sampleapi.simple.sub",68"sampleapi.tiny",69"sampleapi.tiny.sub",70"sampleapi.fx"71});7273if (res > 0)74throw new Exception("exit status is non-zero: " + res + " for HTML5.");75}76}777879