langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java
author jjg
Tue, 14 May 2013 10:14:54 -0700
changeset 17567 56e83a873757
parent 17566 7e1a338e1085
child 17572 1081a023532f
permissions -rw-r--r--
8012176: reduce use of TagletOutputImpl.toString Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16319
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     1
/*
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     2
 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     4
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     8
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    13
 * accompanied this code).
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    14
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    18
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    21
 * questions.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    22
 */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    23
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    24
/*
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    25
 * @test
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    26
 * @bug 7112427
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    27
 * @summary Test of the JavaFX doclet features.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    28
 * @author jvalenta
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    29
 * @library ../lib/
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    30
 * @build JavadocTester TestJavaFX
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    31
 * @run main TestJavaFX
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    32
 */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    33
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    34
public class TestJavaFX extends JavadocTester {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    35
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    36
    private static final String BUG_ID = "7112427";
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    37
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    38
    private static final String[][] TEST =
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    39
        new String[][] {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    40
            {"./" + BUG_ID + "/C.html",
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 16319
diff changeset
    41
                "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL +
16319
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    42
                "<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"},
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    43
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    44
                "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>" + NL +
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    45
                "<div class=\"block\">Sets the value of the property rate.</div>" + NL +
17567
56e83a873757 8012176: reduce use of TagletOutputImpl.toString
jjg
parents: 17566
diff changeset
    46
                "<dl>" + NL + "<dt><span class=\"strong\">Property description:</span></dt>" },
16319
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    47
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    48
                "<pre>public final&nbsp;double&nbsp;getRate()</pre>" + NL +
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    49
                "<div class=\"block\">Gets the value of the property rate.</div>" + NL +
17567
56e83a873757 8012176: reduce use of TagletOutputImpl.toString
jjg
parents: 17566
diff changeset
    50
                "<dl>" + NL + "<dt><span class=\"strong\">Property description:</span></dt>" },
16319
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    51
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    52
                "<td class=\"colLast\"><code><strong><a href=\"C.html#rateProperty\">rate</a></strong></code>" + NL +
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    53
                "<div class=\"block\">Defines the direction/speed at which the <code>Timeline</code> is expected to"},
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    54
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    55
                "<sub id=\"expert\">Expert tag text</sub>"},
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    56
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    57
                "<span class=\"strong\">Default value:</span>"},
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    58
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    59
                "<P>Sets the value of the property <CODE>Property</CODE>"},
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    60
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    61
                "<P>Gets the value of the property <CODE>Property</CODE>"},
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    62
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    63
                "<span class=\"strong\">Property description:</span>"},
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    64
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    65
                "<td class=\"colLast\"><code><strong><a href=\"C.html#setTestMethodProperty()\">setTestMethodProperty</a></strong>()</code>&nbsp;</td>" },
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    66
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    67
                "<h4>isPaused</h4>" + NL +
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    68
                "<pre>public final&nbsp;double&nbsp;isPaused()</pre>" + NL +
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    69
                "<div class=\"block\">Gets the value of the property paused.</div>" },
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    70
            {"./" + BUG_ID + "/D.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    71
                "<h3>Properties inherited from class&nbsp;<a href=\"C.html\" title=\"class in &lt;Unnamed&gt;\">C</a></h3>" + NL +
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    72
                "<code><a href=\"C.html#pausedProperty\">paused</a>, <a href=\"C.html#rateProperty\">rate</a></code></li>" },
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    73
        };
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    74
    private static final String[][] NO_TEST =
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    75
        new String[][] {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    76
            {"./" + BUG_ID + "/C.html",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    77
                "A()"},
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    78
        };
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    79
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    80
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    81
    private static final String[] ARGS = new String[] {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    82
        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-private", "-javafx",
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    83
        SRC_DIR + FS + "C.java", SRC_DIR + FS + "D.java"
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    84
    };
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    85
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    86
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    87
     * The entry point of the test.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    88
     * @param args the array of command line arguments.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    89
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    90
    public static void main(String[] args) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    91
        TestJavaFX tester = new TestJavaFX();
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    92
        run(tester, ARGS, TEST, NO_TEST);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    93
        tester.printSummary();
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    94
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    95
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    96
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    97
     * {@inheritDoc}
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    98
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    99
    public String getBugId() {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   100
        return BUG_ID;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   101
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   102
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   103
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   104
     * {@inheritDoc}
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   105
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   106
    public String getBugName() {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   107
        return getClass().getName();
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   108
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   109
}