Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/test/com/sun/javadoc/testEmptyClass/TestEmptyClass.java
48035 views
/*1* Copyright (c) 2001, 2006, 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 4483401 4483407 4483409 4483413 449434326* @summary Test to make sure that Javadoc behaves properly when27* run on a completely empty class (no comments or members).28* @author jamieh29* @library ../lib/30* @build JavadocTester31* @build TestEmptyClass32* @run main TestEmptyClass33*/3435public class TestEmptyClass extends JavadocTester {3637private static final String OUTPUT_DIR = "tmp";38private static final String[][] TEST = NO_TEST;39private static final String[][] NEGATED_TEST = {4041//The overview tree should not link to classes that were not documented42{OUTPUT_DIR + FS + "overview-tree.html", "<A HREF=\"TestEmptyClass.html\">"},4344//The index page should not link to classes that were not documented45{OUTPUT_DIR + FS + "index-all.html", "<A HREF=\"TestEmptyClass.html\">"},46};47private static final String[] ARGS =48new String[] {49"-classpath", SRC_DIR + FS + "src",50"-d", OUTPUT_DIR, "-sourcepath", SRC_DIR + FS + "src",51SRC_DIR + FS + "src" + FS + "Empty.java"52};53private static final String BUG_ID = "4483401 4483407 4483409 4483413 4494343";5455/**56* The entry point of the test.57* @param args the array of command line arguments.58*/59public static void main(String[] args) {60TestEmptyClass tester = new TestEmptyClass();61int exitCode = run(tester, ARGS, TEST, NEGATED_TEST);62tester.printSummary();63if (exitCode != 0) {64throw new Error("Error found while executing Javadoc");65}66}6768/**69* {@inheritDoc}70*/71public String getBugId() {72return BUG_ID;73}7475/**76* {@inheritDoc}77*/78public String getBugName() {79return getClass().getName();80}81}828384