/* * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * @bug 6786688 8008164 * @summary HTML tables should have table summary, caption and table headers. * @author Bhavesh Patel * @library ../lib/ * @build JavadocTester * @build TestHtmlTableTags * @run main TestHtmlTableTags */ public class TestHtmlTableTags extends JavadocTester { //Test information. private static final String BUG_ID = "6786688"; //Javadoc arguments. private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2" }; //Input for string tests for HTML table tags. private static final String[][] TABLE_TAGS_TEST = { /* * Test for validating summary for HTML tables */ //Package summary {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "
" + "Class | " + NL + "Description | " }, {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "" + "Interface | " + NL + "Description | " }, {BUG_ID + FS + "pkg2" + FS + "package-summary.html", "" + "Enum | " + NL + "Description | " }, {BUG_ID + FS + "pkg2" + FS + "package-summary.html", "" + "Annotation Type | " + NL + "Description | " }, // Class documentation {BUG_ID + FS + "pkg1" + FS + "C1.html", "Modifier and Type | " + NL + "Field and Description | " }, {BUG_ID + FS + "pkg1" + FS + "C1.html", "Modifier and Type | " + NL + "Method and Description | " }, {BUG_ID + FS + "pkg2" + FS + "C2.html", "Modifier and Type | " + NL + "Class and Description | " }, {BUG_ID + FS + "pkg2" + FS + "C2.html", "Constructor and Description | " }, {BUG_ID + FS + "pkg2" + FS + "C2.ModalExclusionType.html", "Enum Constant and Description | " }, {BUG_ID + FS + "pkg2" + FS + "C3.html", "Modifier and Type | " + NL + "Required Element and Description | " }, {BUG_ID + FS + "pkg2" + FS + "C4.html", "Modifier and Type | " + NL + "Optional Element and Description | " }, // Class use documentation {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "I1.html", "Package | " + NL + "Description | " }, {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html", "Modifier and Type | " + NL + "Field and Description | " }, {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html", "Modifier and Type | " + NL + "Method and Description | " }, {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html", "Modifier and Type | " + NL + "Field and Description | " }, {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html", "Modifier and Type | " + NL + "Method and Description | " }, {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html", "Package | " + NL + "Description | " }, {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html", "Modifier and Type | " + NL + "Method and Description | " }, // Package use documentation {BUG_ID + FS + "pkg1" + FS + "package-use.html", "Package | " + NL + "Description | " }, {BUG_ID + FS + "pkg1" + FS + "package-use.html", "Class and Description | " }, {BUG_ID + FS + "pkg2" + FS + "package-use.html", "Package | " + NL + "Description | " }, {BUG_ID + FS + "pkg2" + FS + "package-use.html", "Class and Description | " }, // Deprecated {BUG_ID + FS + "deprecated-list.html", "Field and Description | " }, {BUG_ID + FS + "deprecated-list.html", "Method and Description | " }, // Constant values {BUG_ID + FS + "constant-values.html", "" + "Modifier and Type | " + NL + "Constant Field | " + NL + "Value | " }, // Overview Summary {BUG_ID + FS + "overview-summary.html", "" + "Package | " + NL + "Description | " } }; private static final String[][] NEGATED_TEST = NO_TEST; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestHtmlTableTags tester = new TestHtmlTableTags(); run(tester, ARGS, TABLE_TAGS_TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
---|