langtools/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java
changeset 1787 1aa079321cd2
child 2320 5b8c377175f4
equal deleted inserted replaced
1753:d4c11dcedac3 1787:1aa079321cd2
       
     1 /*
       
     2  * Copyright 1999-2008 Sun Microsystems, Inc.  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.  Sun designates this
       
     8  * particular file as subject to the "Classpath" exception as provided
       
     9  * by Sun in the LICENSE file that accompanied this code.
       
    10  *
       
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14  * version 2 for more details (a copy is included in the LICENSE file that
       
    15  * accompanied this code).
       
    16  *
       
    17  * You should have received a copy of the GNU General Public License version
       
    18  * 2 along with this work; if not, write to the Free Software Foundation,
       
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20  *
       
    21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
       
    22  * CA 95054 USA or visit www.sun.com if you need additional information or
       
    23  * have any questions.
       
    24  */
       
    25 
       
    26 /*
       
    27  * @test
       
    28  * @bug 6786028
       
    29  * @summary This test verifys the use of <strong> HTML tag instead of <B> by Javadoc std doclet.
       
    30  * @author Bhavesh Patel
       
    31  * @library ../lib/
       
    32  * @build JavadocTester
       
    33  * @build TestHtmlStrongTag
       
    34  * @run main TestHtmlStrongTag
       
    35  */
       
    36 
       
    37 public class TestHtmlStrongTag extends JavadocTester {
       
    38 
       
    39     private static final String BUG_ID = "6786028";
       
    40     private static final String[][] TEST1 = {
       
    41         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<STRONG>Method Summary</STRONG>"},
       
    42         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<STRONG>See Also:</STRONG>"},
       
    43         {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<STRONG>Class Summary</STRONG>"}};
       
    44     private static final String[][] NEGATED_TEST1 = {
       
    45         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<B>"}};
       
    46     private static final String[][] TEST2 = {
       
    47         {BUG_ID + FS + "pkg2" + FS + "C2.html", "<STRONG>Method Summary</STRONG>"},
       
    48         {BUG_ID + FS + "pkg2" + FS + "C2.html", "<B>Comments:</B>"},
       
    49         {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<STRONG>Class Summary</STRONG>"}};
       
    50 
       
    51     private static final String[] ARGS1 =
       
    52         new String[] {
       
    53             "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"};
       
    54     private static final String[] ARGS2 =
       
    55         new String[] {
       
    56             "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg2"};
       
    57 
       
    58     /**
       
    59      * The entry point of the test.
       
    60      * @param args the array of command line arguments.
       
    61      */
       
    62     public static void main(String[] args) {
       
    63         TestHtmlStrongTag tester = new TestHtmlStrongTag();
       
    64         run(tester, ARGS1, TEST1, NEGATED_TEST1);
       
    65         run(tester, ARGS2, TEST2, NO_TEST);
       
    66         tester.printSummary();
       
    67     }
       
    68 
       
    69     /**
       
    70      * {@inheritDoc}
       
    71      */
       
    72     public String getBugId() {
       
    73         return BUG_ID;
       
    74     }
       
    75 
       
    76     /**
       
    77      * {@inheritDoc}
       
    78      */
       
    79     public String getBugName() {
       
    80         return getClass().getName();
       
    81     }
       
    82 }