test/com/sun/javadoc/testNestedInlineTag/TestNestedInlineTag.java

Wed, 15 Oct 2008 08:07:59 -0700

author
jjg
date
Wed, 15 Oct 2008 08:07:59 -0700
changeset 140
22c4c1143a3a
parent 1
9a66ca7c79fa
child 554
9d9f26857129
permissions
-rw-r--r--

6748541: javadoc should be reusable
Reviewed-by: bpatel

     1 /*
     2  * Copyright 2001-2002 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  * This should be green, underlined and bold (Class): {@underline {@bold {@green My test}}} .
    26  * @test
    27  * @bug 0000000
    28  * @summary Test for nested inline tags. *
    29  * @author jamieh
    30  * @library ../lib/
    31  * @build JavadocTester
    32  * @build testtaglets.UnderlineTaglet
    33  * @build testtaglets.BoldTaglet
    34  * @build testtaglets.GreenTaglet
    35  * @build TestNestedInlineTag
    36  * @run main TestNestedInlineTag
    37  */
    39 public class TestNestedInlineTag extends JavadocTester {
    41     /**
    42      * This should be green, underlined and bold (Field): {@underline {@bold {@green My test}}} .
    43      */
    44     public int field;
    46     /**
    47      * This should be green, underlined and bold (Constructor): {@underline {@bold {@green My test}}} .
    48      */
    49     public TestNestedInlineTag(){}
    51     /**
    52      * This should be green, underlined and bold (Method): {@underline {@bold {@green My test}}} .
    53      */
    54     public void method(){}
    56     private static final String BUG_ID = "no-bug-id";
    57     private static final String[][] TEST = {
    58         //Test nested inline tag in class description.
    59         {BUG_ID + FS + "TestNestedInlineTag.html",
    60          "This should be green, underlined and bold (Class): <u><b><font color=\"green\">My test</font></b></u>"
    61         },
    63         //Test nested inline tag in field description.
    64         {BUG_ID + FS + "TestNestedInlineTag.html",
    65          "This should be green, underlined and bold (Field): <u><b><font color=\"green\">My test</font></b></u>"
    66         },
    68         //Test nested inline tag in constructor description.
    69         {BUG_ID + FS + "TestNestedInlineTag.html",
    70          "This should be green, underlined and bold (Constructor): <u><b><font color=\"green\">My test</font></b></u>"
    71         },
    73         //Test nested inline tag in method description.
    74         {BUG_ID + FS + "TestNestedInlineTag.html",
    75          "This should be green, underlined and bold (Method): <u><b><font color=\"green\">My test</font></b></u>"
    76         }
    77     };
    79     private static final String[][] NEGATED_TEST = NO_TEST;
    80     private static final String[] ARGS =
    81         new String[] {
    82             "-d", BUG_ID, "-sourcepath", SRC_DIR,
    83             "-taglet", "testtaglets.UnderlineTaglet",
    84             "-taglet", "testtaglets.BoldTaglet",
    85             "-taglet", "testtaglets.GreenTaglet",
    86             SRC_DIR + FS + "TestNestedInlineTag.java"
    87         };
    89     /**
    90      * The entry point of the test.
    91      * @param args the array of command line arguments.
    92      */
    93     public static void main(String[] args) {
    94         TestNestedInlineTag tester = new TestNestedInlineTag();
    95         run(tester, ARGS, TEST, NEGATED_TEST);
    96         tester.printSummary();
    97     }
    99     /**
   100      * {@inheritDoc}
   101      */
   102     public String getBugId() {
   103         return BUG_ID;
   104     }
   106     /**
   107      * {@inheritDoc}
   108      */
   109     public String getBugName() {
   110         return getClass().getName();
   111     }
   112 }

mercurial