test/com/sun/javadoc/testJavaFX/TestJavaFX.java

Sun, 24 Feb 2013 11:36:58 -0800

author
jjg
date
Sun, 24 Feb 2013 11:36:58 -0800
changeset 1606
ccbe7ffdd867
child 1743
6a5288a298fd
permissions
-rw-r--r--

7112427: The doclet needs to be able to generate JavaFX documentation.
Reviewed-by: jjg
Contributed-by: jan.valenta@oracle.com

     1 /*
     2  * Copyright (c) 2012, 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  * @bug 7112427
    27  * @summary Test of the JavaFX doclet features.
    28  * @author jvalenta
    29  * @library ../lib/
    30  * @build JavadocTester TestJavaFX
    31  * @run main TestJavaFX
    32  */
    34 public class TestJavaFX extends JavadocTester {
    36     private static final String BUG_ID = "7112427";
    38     private static final String[][] TEST =
    39         new String[][] {
    40             {"./" + BUG_ID + "/C.html",
    41                 "<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL +
    42                 "<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"},
    43             {"./" + BUG_ID + "/C.html",
    44                 "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>" + NL +
    45                 "<div class=\"block\">Sets the value of the property rate.</div>" + NL +
    46                 "<dl><dt><span class=\"strong\">Property description:</span></dt>" },
    47             {"./" + BUG_ID + "/C.html",
    48                 "<pre>public final&nbsp;double&nbsp;getRate()</pre>" + NL +
    49                 "<div class=\"block\">Gets the value of the property rate.</div>" + NL +
    50                 "<dl><dt><span class=\"strong\">Property description:</span></dt>" },
    51             {"./" + BUG_ID + "/C.html",
    52                 "<td class=\"colLast\"><code><strong><a href=\"C.html#rateProperty\">rate</a></strong></code>" + NL +
    53                 "<div class=\"block\">Defines the direction/speed at which the <code>Timeline</code> is expected to"},
    54             {"./" + BUG_ID + "/C.html",
    55                 "<sub id=\"expert\">Expert tag text</sub>"},
    56             {"./" + BUG_ID + "/C.html",
    57                 "<span class=\"strong\">Default value:</span>"},
    58             {"./" + BUG_ID + "/C.html",
    59                 "<P>Sets the value of the property <CODE>Property</CODE>"},
    60             {"./" + BUG_ID + "/C.html",
    61                 "<P>Gets the value of the property <CODE>Property</CODE>"},
    62             {"./" + BUG_ID + "/C.html",
    63                 "<span class=\"strong\">Property description:</span>"},
    64             {"./" + BUG_ID + "/C.html",
    65                 "<td class=\"colLast\"><code><strong><a href=\"C.html#setTestMethodProperty()\">setTestMethodProperty</a></strong>()</code>&nbsp;</td>" },
    66             {"./" + BUG_ID + "/C.html",
    67                 "<h4>isPaused</h4>" + NL +
    68                 "<pre>public final&nbsp;double&nbsp;isPaused()</pre>" + NL +
    69                 "<div class=\"block\">Gets the value of the property paused.</div>" },
    70             {"./" + BUG_ID + "/D.html",
    71                 "<h3>Properties inherited from class&nbsp;<a href=\"C.html\" title=\"class in &lt;Unnamed&gt;\">C</a></h3>" + NL +
    72                 "<code><a href=\"C.html#pausedProperty\">paused</a>, <a href=\"C.html#rateProperty\">rate</a></code></li>" },
    73         };
    74     private static final String[][] NO_TEST =
    75         new String[][] {
    76             {"./" + BUG_ID + "/C.html",
    77                 "A()"},
    78         };
    81     private static final String[] ARGS = new String[] {
    82         "-d", BUG_ID, "-sourcepath", SRC_DIR, "-private", "-javafx",
    83         SRC_DIR + FS + "C.java", SRC_DIR + FS + "D.java"
    84     };
    86     /**
    87      * The entry point of the test.
    88      * @param args the array of command line arguments.
    89      */
    90     public static void main(String[] args) {
    91         TestJavaFX tester = new TestJavaFX();
    92         run(tester, ARGS, TEST, NO_TEST);
    93         tester.printSummary();
    94     }
    96     /**
    97      * {@inheritDoc}
    98      */
    99     public String getBugId() {
   100         return BUG_ID;
   101     }
   103     /**
   104      * {@inheritDoc}
   105      */
   106     public String getBugName() {
   107         return getClass().getName();
   108     }
   109 }

mercurial