Fri, 04 Oct 2013 13:32:30 -0700
8008164: Invisible table captions in javadoc-generated html
Reviewed-by: jjg
bpatel@943 | 1 | /* |
bpatel@943 | 2 | * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
bpatel@943 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
bpatel@943 | 4 | * |
bpatel@943 | 5 | * This code is free software; you can redistribute it and/or modify it |
bpatel@943 | 6 | * under the terms of the GNU General Public License version 2 only, as |
bpatel@943 | 7 | * published by the Free Software Foundation. |
bpatel@943 | 8 | * |
bpatel@943 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
bpatel@943 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
bpatel@943 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
bpatel@943 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
bpatel@943 | 13 | * accompanied this code). |
bpatel@943 | 14 | * |
bpatel@943 | 15 | * You should have received a copy of the GNU General Public License version |
bpatel@943 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
bpatel@943 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
bpatel@943 | 18 | * |
bpatel@943 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
bpatel@943 | 20 | * or visit www.oracle.com if you need additional information or have any |
bpatel@943 | 21 | * questions. |
bpatel@943 | 22 | */ |
bpatel@943 | 23 | |
bpatel@943 | 24 | /* |
bpatel@943 | 25 | * @test |
bpatel@943 | 26 | * @bug 7010342 |
bpatel@943 | 27 | * @summary Test for correct sub title generation. |
bpatel@943 | 28 | * @author Bhavesh Patel |
bpatel@943 | 29 | * @library ../lib/ |
bpatel@943 | 30 | * @build JavadocTester |
bpatel@943 | 31 | * @build TestSubTitle |
bpatel@943 | 32 | * @run main TestSubTitle |
bpatel@943 | 33 | */ |
bpatel@943 | 34 | |
bpatel@943 | 35 | public class TestSubTitle extends JavadocTester { |
bpatel@943 | 36 | |
bpatel@943 | 37 | private static final String BUG_ID = "7010342"; |
bpatel@943 | 38 | private static final String[][] TEST = { |
bpatel@943 | 39 | {BUG_ID + FS + "pkg" + FS + "package-summary.html", |
bpatel@995 | 40 | "<div class=\"block\">This is the description of package pkg.</div>" |
bpatel@943 | 41 | }, |
bpatel@943 | 42 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@943 | 43 | "<div class=\"subTitle\">pkg</div>" |
bpatel@943 | 44 | } |
bpatel@943 | 45 | }; |
bpatel@943 | 46 | private static final String[][] NEG_TEST = { |
bpatel@943 | 47 | {BUG_ID + FS + "pkg" + FS + "package-summary.html", |
bpatel@943 | 48 | "<p class=\"subTitle\">" + NL + "<div class=\"block\">This is the " + |
bpatel@943 | 49 | "description of package pkg.</div>" + NL + "</p>" |
bpatel@943 | 50 | }, |
bpatel@943 | 51 | {BUG_ID + FS + "pkg" + FS + "C.html", |
bpatel@943 | 52 | "<p class=\"subTitle\">pkg</p>" |
bpatel@943 | 53 | } |
bpatel@943 | 54 | }; |
bpatel@943 | 55 | private static final String[] ARGS = new String[]{ |
bpatel@943 | 56 | "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" |
bpatel@943 | 57 | }; |
bpatel@943 | 58 | |
bpatel@943 | 59 | /** |
bpatel@943 | 60 | * The entry point of the test. |
bpatel@943 | 61 | * @param args the array of command line arguments. |
bpatel@943 | 62 | */ |
bpatel@943 | 63 | public static void main(String[] args) { |
bpatel@943 | 64 | TestSubTitle tester = new TestSubTitle(); |
bpatel@943 | 65 | run(tester, ARGS, TEST, NEG_TEST); |
bpatel@943 | 66 | tester.printSummary(); |
bpatel@943 | 67 | } |
bpatel@943 | 68 | |
bpatel@943 | 69 | /** |
bpatel@943 | 70 | * {@inheritDoc} |
bpatel@943 | 71 | */ |
bpatel@943 | 72 | public String getBugId() { |
bpatel@943 | 73 | return BUG_ID; |
bpatel@943 | 74 | } |
bpatel@943 | 75 | |
bpatel@943 | 76 | /** |
bpatel@943 | 77 | * {@inheritDoc} |
bpatel@943 | 78 | */ |
bpatel@943 | 79 | public String getBugName() { |
bpatel@943 | 80 | return getClass().getName(); |
bpatel@943 | 81 | } |
bpatel@943 | 82 | } |