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

Wed, 27 Apr 2016 01:34:52 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:34:52 +0800
changeset 0
959103a6100f
child 2525
2eb010b6cb22
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/
changeset: 2573:53ca196be1ae
tag: jdk8u25-b17

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

mercurial