--- old/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java Fri Jan 22 12:23:39 2016 +++ /dev/null Fri Jan 22 12:23:39 2016 @@ -1,359 +0,0 @@ -/* - * Copyright (c) 2009, 2015, 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 - * @modules jdk.javadoc - * @build JavadocTester - * @run main TestHtmlTableTags - */ - -public class TestHtmlTableTags extends JavadocTester { - - //Javadoc arguments. - private static final String[] ARGS = new String[] { - - }; - - - public static void main(String... args) throws Exception { - TestHtmlTableTags tester = new TestHtmlTableTags(); - tester.runTests(); - } - - @Test - void test() { - javadoc("-d", "out", - "-sourcepath", testSrc, - "-use", - "pkg1", "pkg2"); - checkExit(Exit.OK); - - checkHtmlTableSummaries(); - checkHtmlTableCaptions(); - checkHtmlTableHeaders(); - } - - /* - * Tests for validating summary for HTML tables - */ - void checkHtmlTableSummaries() { - //Package summary - checkOutput("pkg1/package-summary.html", true, - "", - "
"); - - checkOutput("pkg2/package-summary.html", true, - "
", - "
"); - - // Class documentation - checkOutput("pkg1/C1.html", true, - "
", - "
"); - - checkOutput("pkg2/C2.html", true, - "
", - "
"); - - checkOutput("pkg2/C2.ModalExclusionType.html", true, - "
"); - - checkOutput("pkg2/C3.html", true, - "
"); - - checkOutput("pkg2/C4.html", true, - "
"); - - // Class use documentation - checkOutput("pkg1/class-use/I1.html", true, - "
"); - - checkOutput("pkg1/class-use/C1.html", true, - "
", - "
"); - - checkOutput("pkg2/class-use/C2.html", true, - "
", - "
"); - - checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true, - "
"); - - checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true, - "
"); - - // Package use documentation - checkOutput("pkg1/package-use.html", true, - "
", - "
"); - - checkOutput("pkg2/package-use.html", true, - "
", - "
"); - - // Deprecated - checkOutput("deprecated-list.html", true, - "
", - "
"); - - // Constant values - checkOutput("constant-values.html", true, - "
"); - - // Overview Summary - checkOutput("overview-summary.html", true, - "
"); - } - - /* - * Tests for validating caption for HTML tables - */ - void checkHtmlTableCaptions() { - //Package summary - checkOutput("pkg1/package-summary.html", true, - "", - ""); - - checkOutput("pkg2/package-summary.html", true, - "", - ""); - - // Class documentation - checkOutput("pkg1/C1.html", true, - "", - ""); - - checkOutput("pkg2/C2.html", true, - "", - ""); - - checkOutput("pkg2/C2.ModalExclusionType.html", true, - ""); - - checkOutput("pkg2/C3.html", true, - ""); - - checkOutput("pkg2/C4.html", true, - ""); - - // Class use documentation - checkOutput("pkg1/class-use/I1.html", true, - ""); - - checkOutput("pkg1/class-use/C1.html", true, - "", - ""); - - checkOutput("pkg2/class-use/C2.html", true, - "", - ""); - - checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true, - ""); - - // Package use documentation - checkOutput("pkg1/package-use.html", true, - "", - ""); - - checkOutput("pkg2/package-use.html", true, - "", - ""); - - // Deprecated - checkOutput("deprecated-list.html", true, - "", - ""); - - // Constant values - checkOutput("constant-values.html", true, - ""); - - // Overview Summary - checkOutput("overview-summary.html", true, - ""); - } - - /* - * Test for validating headers for HTML tables - */ - void checkHtmlTableHeaders() { - //Package summary - checkOutput("pkg1/package-summary.html", true, - "\n" - + "", - "\n" - + ""); - - checkOutput("pkg2/package-summary.html", true, - "\n" - + "", - "\n" - + ""); - - // Class documentation - checkOutput("pkg1/C1.html", true, - "\n" - + "", - "\n" - + ""); - - checkOutput("pkg2/C2.html", true, - "\n" - + "", - ""); - - checkOutput("pkg2/C2.ModalExclusionType.html", true, - ""); - - checkOutput("pkg2/C3.html", true, - "\n" - + ""); - - checkOutput("pkg2/C4.html", true, - "\n" - + ""); - - // Class use documentation - checkOutput("pkg1/class-use/I1.html", true, - "\n" - + ""); - - checkOutput("pkg1/class-use/C1.html", true, - "\n" - + "", - "\n" - + ""); - - checkOutput("pkg2/class-use/C2.html", true, - "\n" - + "", - "\n" - + ""); - - checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true, - "\n" - + "", - "\n" - + ""); - - // Package use documentation - checkOutput("pkg1/package-use.html", true, - "\n" - + "", - ""); - - checkOutput("pkg2/package-use.html", true, - "\n" - + "", - ""); - - // Deprecated - checkOutput("deprecated-list.html", true, - "", - ""); - - // Constant values - checkOutput("constant-values.html", true, - "\n" - + "Constant Field\n" - + ""); - - // Overview Summary - checkOutput("overview-summary.html", true, - "\n" - + ""); - } -} --- /dev/null Fri Jan 22 12:23:39 2016 +++ new/test/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java Fri Jan 22 12:23:39 2016 @@ -0,0 +1,359 @@ +/* + * Copyright (c) 2009, 2015, 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 + * @modules jdk.javadoc + * @build JavadocTester + * @run main TestHtmlTableTags + */ + +public class TestHtmlTableTags extends JavadocTester { + + //Javadoc arguments. + private static final String[] ARGS = new String[] { + + }; + + + public static void main(String... args) throws Exception { + TestHtmlTableTags tester = new TestHtmlTableTags(); + tester.runTests(); + } + + @Test + void test() { + javadoc("-d", "out", + "-sourcepath", testSrc, + "-use", + "pkg1", "pkg2"); + checkExit(Exit.OK); + + checkHtmlTableSummaries(); + checkHtmlTableCaptions(); + checkHtmlTableHeaders(); + } + + /* + * Tests for validating summary for HTML tables + */ + void checkHtmlTableSummaries() { + //Package summary + checkOutput("pkg1/package-summary.html", true, + "
Class Summary" - + " Interface Summary" - + " Enum Summary" - + " Annotation Types Summary" - + " Fields All " - + "Methods " - + "" - + "Instance Methods " - + "" - + "Concrete Methods " - + "" - + "Deprecated Methods " - + "Nested Classes Constructors Enum Constants Required Elements " - + "Optional Elements " - + "Packages that use I1" - + " Fields in " - + "pkg2 declared as C1 " - + "Methods in " - + "pkg2 that return C1" - + " Fields in " - + "pkg1 declared as C2" - + " Methods in " - + "pkg1 that return C2" - + " Methods in " - + "pkg2 that return C2.ModalExclusionType" - + " Packages that use " - + "pkg1 Classes in " - + "pkg1 used by pkg1" - + " Packages that use " - + "pkg2 Classes in " - + "pkg2 used by pkg1" - + " Deprecated Fields" - + " Deprecated Methods" - + " pkg1." - + "C1 Packages 
" - + "ClassDescription" - + "InterfaceDescription" - + "EnumDescription" - + "Annotation TypeDescriptionModifier and TypeField and DescriptionModifier and TypeMethod and DescriptionModifier and TypeClass and DescriptionConstructor and DescriptionEnum Constant and DescriptionModifier and TypeRequired Element and DescriptionModifier and TypeOptional Element and DescriptionPackageDescriptionModifier and TypeField and DescriptionModifier and TypeMethod and DescriptionModifier and TypeField and DescriptionModifier and TypeMethod and DescriptionPackageDescriptionModifier and TypeMethod and DescriptionPackageDescriptionClass and DescriptionPackageDescriptionClass and DescriptionField and DescriptionMethod and Description" - + "Modifier and TypeValue" - + "PackageDescription
", + "
"); + + checkOutput("pkg2/package-summary.html", true, + "
", + "
"); + + // Class documentation + checkOutput("pkg1/C1.html", true, + "
", + "
"); + + checkOutput("pkg2/C2.html", true, + "
", + "
"); + + checkOutput("pkg2/C2.ModalExclusionType.html", true, + "
"); + + checkOutput("pkg2/C3.html", true, + "
"); + + checkOutput("pkg2/C4.html", true, + "
"); + + // Class use documentation + checkOutput("pkg1/class-use/I1.html", true, + "
"); + + checkOutput("pkg1/class-use/C1.html", true, + "
", + "
"); + + checkOutput("pkg2/class-use/C2.html", true, + "
", + "
"); + + checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true, + "
"); + + checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true, + "
"); + + // Package use documentation + checkOutput("pkg1/package-use.html", true, + "
", + "
"); + + checkOutput("pkg2/package-use.html", true, + "
", + "
"); + + // Deprecated + checkOutput("deprecated-list.html", true, + "
", + "
"); + + // Constant values + checkOutput("constant-values.html", true, + "
"); + + // Overview Summary + checkOutput("overview-summary.html", true, + "
"); + } + + /* + * Tests for validating caption for HTML tables + */ + void checkHtmlTableCaptions() { + //Package summary + checkOutput("pkg1/package-summary.html", true, + "", + ""); + + checkOutput("pkg2/package-summary.html", true, + "", + ""); + + // Class documentation + checkOutput("pkg1/C1.html", true, + "", + ""); + + checkOutput("pkg2/C2.html", true, + "", + ""); + + checkOutput("pkg2/C2.ModalExclusionType.html", true, + ""); + + checkOutput("pkg2/C3.html", true, + ""); + + checkOutput("pkg2/C4.html", true, + ""); + + // Class use documentation + checkOutput("pkg1/class-use/I1.html", true, + ""); + + checkOutput("pkg1/class-use/C1.html", true, + "", + ""); + + checkOutput("pkg2/class-use/C2.html", true, + "", + ""); + + checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true, + ""); + + // Package use documentation + checkOutput("pkg1/package-use.html", true, + "", + ""); + + checkOutput("pkg2/package-use.html", true, + "", + ""); + + // Deprecated + checkOutput("deprecated-list.html", true, + "", + ""); + + // Constant values + checkOutput("constant-values.html", true, + ""); + + // Overview Summary + checkOutput("overview-summary.html", true, + ""); + } + + /* + * Test for validating headers for HTML tables + */ + void checkHtmlTableHeaders() { + //Package summary + checkOutput("pkg1/package-summary.html", true, + "\n" + + "", + "\n" + + ""); + + checkOutput("pkg2/package-summary.html", true, + "\n" + + "", + "\n" + + ""); + + // Class documentation + checkOutput("pkg1/C1.html", true, + "\n" + + "", + "\n" + + ""); + + checkOutput("pkg2/C2.html", true, + "\n" + + "", + ""); + + checkOutput("pkg2/C2.ModalExclusionType.html", true, + ""); + + checkOutput("pkg2/C3.html", true, + "\n" + + ""); + + checkOutput("pkg2/C4.html", true, + "\n" + + ""); + + // Class use documentation + checkOutput("pkg1/class-use/I1.html", true, + "\n" + + ""); + + checkOutput("pkg1/class-use/C1.html", true, + "\n" + + "", + "\n" + + ""); + + checkOutput("pkg2/class-use/C2.html", true, + "\n" + + "", + "\n" + + ""); + + checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true, + "\n" + + "", + "\n" + + ""); + + // Package use documentation + checkOutput("pkg1/package-use.html", true, + "\n" + + "", + ""); + + checkOutput("pkg2/package-use.html", true, + "\n" + + "", + ""); + + // Deprecated + checkOutput("deprecated-list.html", true, + "", + ""); + + // Constant values + checkOutput("constant-values.html", true, + "\n" + + "Constant Field\n" + + ""); + + // Overview Summary + checkOutput("overview-summary.html", true, + "\n" + + ""); + } +}
Class Summary" + + " Interface Summary" + + " Enum Summary" + + " Annotation Types Summary" + + " Fields All " + + "Methods " + + "" + + "Instance Methods " + + "" + + "Concrete Methods " + + "" + + "Deprecated Methods " + + "Nested Classes Constructors Enum Constants Required Elements " + + "Optional Elements " + + "Packages that use I1" + + " Fields in " + + "pkg2 declared as C1 " + + "Methods in " + + "pkg2 that return C1" + + " Fields in " + + "pkg1 declared as C2" + + " Methods in " + + "pkg1 that return C2" + + " Methods in " + + "pkg2 that return C2.ModalExclusionType" + + " Packages that use " + + "pkg1 Classes in " + + "pkg1 used by pkg1" + + " Packages that use " + + "pkg2 Classes in " + + "pkg2 used by pkg1" + + " Deprecated Fields" + + " Deprecated Methods" + + " pkg1." + + "C1 Packages 
" + + "ClassDescription" + + "InterfaceDescription" + + "EnumDescription" + + "Annotation TypeDescriptionModifier and TypeField and DescriptionModifier and TypeMethod and DescriptionModifier and TypeClass and DescriptionConstructor and DescriptionEnum Constant and DescriptionModifier and TypeRequired Element and DescriptionModifier and TypeOptional Element and DescriptionPackageDescriptionModifier and TypeField and DescriptionModifier and TypeMethod and DescriptionModifier and TypeField and DescriptionModifier and TypeMethod and DescriptionPackageDescriptionModifier and TypeMethod and DescriptionPackageDescriptionClass and DescriptionPackageDescriptionClass and DescriptionField and DescriptionMethod and Description" + + "Modifier and TypeValue" + + "PackageDescription