langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java
author jjg
Tue, 22 Apr 2014 17:57:40 -0700
changeset 24072 e7549dcbc4af
parent 24065 fc4022e50129
child 24399 af1a0220d0fa
permissions -rw-r--r--
8040903: Clean up use of BUG_ID in javadoc tests Reviewed-by: ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
     1
/*
23971
f5ff1f5a8dee 8031649: Clean up javadoc tests
jjg
parents: 20613
diff changeset
     2
 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
     4
 *
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
     8
 *
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    13
 * accompanied this code).
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    14
 *
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    18
 *
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    21
 * questions.
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    22
 */
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    23
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    24
/*
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    25
 * @test
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    26
 * @bug 8008164
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    27
 * @summary Test styles on HTML tables generated by javadoc.
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    28
 * @author Bhavesh Patel
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    29
 * @library ../lib/
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    30
 * @build JavadocTester TestHtmlTableStyles
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    31
 * @run main TestHtmlTableStyles
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    32
 */
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    33
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    34
public class TestHtmlTableStyles extends JavadocTester {
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    35
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    36
    //Input for string search tests.
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    37
    private static final String[][] TEST = {
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    38
        { "pkg1/TestTable.html",
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    39
            "<table border cellpadding=3 cellspacing=1>"
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    40
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    41
        { "pkg1/TestTable.html",
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    42
            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    43
            "cellspacing=\"0\" summary=\"Field Summary table, listing fields, " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    44
            "and an explanation\">"
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    45
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    46
        { "pkg1/TestTable.html",
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    47
            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    48
            "cellspacing=\"0\" summary=\"Constructor Summary table, listing " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    49
            "constructors, and an explanation\">"
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    50
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    51
        { "pkg1/TestTable.html",
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    52
            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    53
            "cellspacing=\"0\" summary=\"Method Summary table, listing methods, " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    54
            "and an explanation\">"
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    55
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    56
        { "pkg1/package-summary.html",
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    57
            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    58
            "cellspacing=\"0\" summary=\"Class Summary table, listing classes, " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    59
            "and an explanation\">"
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    60
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    61
        { "pkg1/class-use/TestTable.html",
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    62
            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    63
            "cellspacing=\"0\" summary=\"Use table, listing fields, and an explanation\">"
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    64
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    65
        { "overview-summary.html",
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    66
            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    67
            "cellspacing=\"0\" summary=\"Packages table, listing packages, and an explanation\">"
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    68
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    69
        { "deprecated-list.html",
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    70
            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    71
            "cellspacing=\"0\" summary=\"Deprecated Methods table, listing " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    72
            "deprecated methods, and an explanation\">"
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    73
        },
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    74
        { "constant-values.html",
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    75
            "<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    76
            "cellspacing=\"0\" summary=\"Constant Field Values table, listing " +
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    77
            "constant fields, and values\">"
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    78
        },
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    79
    };
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    80
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    81
    private static final String[] ARGS = new String[] {
24072
e7549dcbc4af 8040903: Clean up use of BUG_ID in javadoc tests
jjg
parents: 24065
diff changeset
    82
        "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    83
    };
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    84
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    85
    /**
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    86
     * The entry point of the test.
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    87
     * @param args the array of command line arguments.
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    88
     */
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    89
    public static void main(String[] args) throws Exception {
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    90
        TestHtmlTableStyles tester = new TestHtmlTableStyles();
24065
fc4022e50129 8041150: Avoid silly use of static methods in JavadocTester
jjg
parents: 23971
diff changeset
    91
        tester.run(ARGS, TEST, NO_TEST);
20613
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    92
        tester.printSummary();
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    93
    }
ab4801a53abb 8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff changeset
    94
}