test/com/sun/javadoc/testTaglets/TestTaglets.java

Tue, 08 Sep 2009 11:29:58 -0700

author
jjg
date
Tue, 08 Sep 2009 11:29:58 -0700
changeset 401
dd98acd9f717
parent 1
9a66ca7c79fa
child 404
14735c7932d7
permissions
-rw-r--r--

6879346: files have Windows newlines
Reviewed-by: darcy

     1 /*
     2  * Copyright 2003 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.
     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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    20  * CA 95054 USA or visit www.sun.com if you need additional information or
    21  * have any questions.
    22  */
    24 /*
    25  * @test
    26  * @bug      4654308 4767038
    27  * @summary  Use a Taglet and include some inline tags such as {@link}.  The
    28  *           inline tags should be interpreted properly.
    29  *           Run Javadoc on some sample source that uses {@inheritDoc}.  Make
    30  *           sure that only the first sentence shows up in the summary table.
    31  * @author   jamieh
    32  * @library  ../lib/
    33  * @build    JavadocTester
    34  * @build    TestTaglets
    35  * @build    taglets.Foo
    36  * @run main TestTaglets
    37  */
    39 public class TestTaglets extends JavadocTester {
    41     //Test information.
    42     private static final String BUG_ID = "4654308-4767038";
    43     private static final String OUTPUT_DIR = BUG_ID;
    45     //Javadoc arguments.
    46     private static final String[] ARGS_4654308 = new String[] {
    47         "-d", "4654308", "-tagletpath", SRC_DIR, "-taglet", "taglets.Foo",
    48         "-sourcepath", SRC_DIR, SRC_DIR + FS + "C.java"
    49     };
    51     private static final String[] ARGS_4767038 = new String[] {
    52         "-d", "4767038", "-sourcepath", SRC_DIR, SRC_DIR + FS + "Parent.java",
    53         SRC_DIR + FS + "Child.java"
    54     };
    56     //Input for string search tests.
    57     private static final String[][] TEST_4654308 = new String[][] {
    58         {"4654308" + FS + "C.html", "<B>Foo:</B><DD>my only method is " +            "<A HREF=\"C.html#method()\"><CODE>here</CODE></A>"}
    59     };
    60     private static final String[][] NEGATED_TEST_4654308 = NO_TEST;
    62     private static final String[][] TEST_4767038 = new String[][] {
    63         {"4767038" + FS + "Child.html",
    64             "&nbsp;This is the first sentence.</TD>"}
    65     };
    66     private static final String[][] NEGATED_TEST_4767038 = NO_TEST;
    69     /**
    70      * The entry point of the test.
    71      * @param args the array of command line arguments.
    72      */
    73     public static void main(String[] args) {
    74         TestTaglets tester = new TestTaglets();
    75         run(tester, ARGS_4654308, TEST_4654308, NEGATED_TEST_4654308);
    76         tester.printSummary();
    77         tester = new TestTaglets();
    78         run(tester, ARGS_4767038, TEST_4767038, NEGATED_TEST_4767038);
    79         tester.printSummary();
    80     }
    82     /**
    83      * {@inheritDoc}
    84      */
    85     public String getBugId() {
    86         return BUG_ID;
    87     }
    89     /**
    90      * {@inheritDoc}
    91      */
    92     public String getBugName() {
    93         return getClass().getName();
    94     }
    95 }

mercurial