test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java

Wed, 13 Aug 2014 14:50:00 -0700

author
katleman
date
Wed, 13 Aug 2014 14:50:00 -0700
changeset 2549
0b6cc4ea670f
parent 0
959103a6100f
permissions
-rw-r--r--

Added tag jdk8u40-b01 for changeset bf89a471779d

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

mercurial