Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/test/com/sun/javadoc/AccessSummary/AccessSummary.java
48580 views
/*1* Copyright (c) 2002, 2010, 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 4637604 477514826* @summary Test the tables for summary attribute27* @author dkramer28* @library ../lib/29* @build JavadocTester30* @build AccessSummary31* @run main AccessSummary32*/3334public class AccessSummary extends JavadocTester {3536private static final String BUG_ID = "4637604-4775148";37private static final String OUTPUT_DIR1 = "docs1-" + BUG_ID + FS;3839/**40* Assign value for [ fileToSearch, stringToFind ]41*/42private static final String[][] TESTARRAY1 = {4344// Test that the summary attribute appears45{ OUTPUT_DIR1 + "overview-summary.html",46"summary=\"Packages table, listing packages, and an explanation\"" },4748// Test that the summary attribute appears49{ OUTPUT_DIR1 + "p1" + FS + "C1.html",50"summary=\"Constructor Summary table, listing constructors, and an explanation\"" },5152// Test that the summary attribute appears53{ OUTPUT_DIR1 + "constant-values.html",54"summary=\"Constant Field Values table, listing constant fields, and values\"" }55};5657// First test with -header only58private static final String[] JAVADOC_ARGS = new String[] {59"-d", OUTPUT_DIR1,60"-sourcepath", SRC_DIR,61"p1", "p2"};6263/**64* The entry point of the test.65* @param args the array of command line arguments.66*/67public static void main(String[] args) {68JavadocTester tester = new AccessSummary();69run(tester, JAVADOC_ARGS, TESTARRAY1, new String[][] {});70tester.printSummary(); // Necessary for string search71}7273/**74* {@inheritDoc}75*/76public String getBugId() {77return BUG_ID;78}7980/**81* {@inheritDoc}82*/83public String getBugName() {84return getClass().getName();85}86}878889