AccessSummary.java revision 765
942N/A/*
942N/A * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
942N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
942N/A *
942N/A * This code is free software; you can redistribute it and/or modify it
942N/A * under the terms of the GNU General Public License version 2 only, as
942N/A * published by the Free Software Foundation.
942N/A *
942N/A * This code is distributed in the hope that it will be useful, but WITHOUT
942N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
942N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
942N/A * version 2 for more details (a copy is included in the LICENSE file that
942N/A * accompanied this code).
942N/A *
942N/A * You should have received a copy of the GNU General Public License version
942N/A * 2 along with this work; if not, write to the Free Software Foundation,
942N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
942N/A *
942N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
942N/A * or visit www.oracle.com if you need additional information or have any
942N/A * questions.
942N/A */
942N/A
942N/A/*
942N/A * @test
942N/A * @bug 4637604 4775148
942N/A * @summary Test the tables for summary attribute
942N/A * @author dkramer
942N/A * @library ../lib/
942N/A * @build JavadocTester
942N/A * @build AccessSummary
942N/A * @run main AccessSummary
942N/A */
942N/A
942N/Apublic class AccessSummary extends JavadocTester {
942N/A
942N/A private static final String BUG_ID = "4637604-4775148";
942N/A private static final String OUTPUT_DIR1 = "docs1-" + BUG_ID + FS;
942N/A
994N/A /**
942N/A * Assign value for [ fileToSearch, stringToFind ]
942N/A */
942N/A private static final String[][] TESTARRAY1 = {
942N/A
942N/A // Test that the summary attribute appears
942N/A { OUTPUT_DIR1 + "overview-summary.html",
942N/A "summary=\"Packages table, listing packages, and an explanation\"" },
942N/A
942N/A // Test that the summary attribute appears
942N/A { OUTPUT_DIR1 + "p1" + FS + "C1.html",
942N/A "summary=\"Constructor Summary table, listing constructors, and an explanation\"" },
942N/A
942N/A // Test that the summary attribute appears
942N/A { OUTPUT_DIR1 + "constant-values.html",
942N/A "summary=\"Constant Field Values table, listing constant fields, and values\"" }
942N/A };
942N/A
942N/A // First test with -header only
942N/A private static final String[] JAVADOC_ARGS = new String[] {
942N/A "-d", OUTPUT_DIR1,
942N/A "-sourcepath", SRC_DIR,
942N/A "p1", "p2"};
942N/A
942N/A /**
942N/A * The entry point of the test.
942N/A * @param args the array of command line arguments.
942N/A */
942N/A public static void main(String[] args) {
942N/A JavadocTester tester = new AccessSummary();
942N/A run(tester, JAVADOC_ARGS, TESTARRAY1, new String[][] {});
942N/A tester.printSummary(); // Necessary for string search
942N/A }
942N/A
942N/A /**
942N/A * {@inheritDoc}
942N/A */
942N/A public String getBugId() {
942N/A return BUG_ID;
942N/A }
942N/A
942N/A /**
942N/A * {@inheritDoc}
*/
public String getBugName() {
return getClass().getName();
}
}