langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java
changeset 24399 af1a0220d0fa
parent 24072 e7549dcbc4af
child 27381 46ea7c75828e
--- a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Fri May 09 23:31:05 2014 +0200
+++ b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Fri May 09 15:37:12 2014 -0700
@@ -26,73 +26,57 @@
  * @bug 7112427 8012295 8025633 8026567
  * @summary Test of the JavaFX doclet features.
  * @author jvalenta
- * @library ../lib/
- * @build JavadocTester TestJavaFX
+ * @library ../lib
+ * @build JavadocTester
  * @run main TestJavaFX
  */
 
 public class TestJavaFX extends JavadocTester {
 
-    private static final String[][] TEST =
-        new String[][] {
-            { "C.html",
-                "<dt><span class=\"seeLabel\">See Also:</span></dt>\n" +
-                "<dd><a href=\"C.html#getRate--\"><code>getRate()</code></a>, \n" +
-                "<a href=\"C.html#setRate-double-\"><code>setRate(double)</code></a></dd>"},
-            { "C.html",
-                "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>\n" +
-                "<div class=\"block\">Sets the value of the property rate.</div>\n" +
-                "<dl>\n" +
-                "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>" },
-            { "C.html",
-                "<pre>public final&nbsp;double&nbsp;getRate()</pre>\n" +
-                "<div class=\"block\">Gets the value of the property rate.</div>\n" +
-                "<dl>\n" +
-                "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>" },
-            { "C.html",
-                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"C.html#rateProperty\">rate</a></span></code>\n" +
-                "<div class=\"block\">Defines the direction/speed at which the <code>Timeline</code> is expected to"},
+    public static void main(String... args) throws Exception {
+        TestJavaFX tester = new TestJavaFX();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-javafx",
+                testSrc("C.java"), testSrc("D.java"));
+        checkExit(Exit.FAILED); // should be EXIT_OK -- need to fix C.java
 
-            { "C.html",
-                "<span class=\"simpleTagLabel\">Default value:</span>"},
-            { "C.html",
-                "<span class=\"simpleTagLabel\">Since:</span></dt>\n" +
-                "<dd>JavaFX 8.0</dd>" },
-            { "C.html",
-                "<p>Sets the value of the property <code>Property</code>"},
-            { "C.html",
-                "<p>Gets the value of the property <code>Property</code>"},
-            { "C.html",
-                "<span class=\"simpleTagLabel\">Property description:</span>"},
-            { "C.html",
-                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"C.html#setTestMethodProperty--\">setTestMethodProperty</a></span>()</code>&nbsp;</td>" },
-            { "C.html",
-                "<h4>isPaused</h4>\n" +
-                "<pre>public final&nbsp;double&nbsp;isPaused()</pre>\n" +
-                "<div class=\"block\">Gets the value of the property paused.</div>" },
-            { "D.html",
-                "<h3>Properties inherited from class&nbsp;<a href=\"C.html\" title=\"class in &lt;Unnamed&gt;\">C</a></h3>\n" +
-                "<code><a href=\"C.html#pausedProperty\">paused</a>, <a href=\"C.html#rateProperty\">rate</a></code></li>" },
-        };
-    private static final String[][] NO_TEST =
-        new String[][] {
-            { "C.html",
-                "A()"},
-        };
+        checkOutput("C.html", true,
+                "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+                + "<dd><a href=\"C.html#getRate--\"><code>getRate()</code></a>, \n"
+                + "<a href=\"C.html#setRate-double-\"><code>setRate(double)</code></a></dd>",
+                "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>\n"
+                + "<div class=\"block\">Sets the value of the property rate.</div>\n"
+                + "<dl>\n"
+                + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
+                "<pre>public final&nbsp;double&nbsp;getRate()</pre>\n"
+                + "<div class=\"block\">Gets the value of the property rate.</div>\n"
+                + "<dl>\n"
+                + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"C.html#rateProperty\">rate</a></span></code>\n"
+                + "<div class=\"block\">Defines the direction/speed at which the <code>Timeline</code> is expected to",
+                "<span class=\"simpleTagLabel\">Default value:</span>",
+                "<span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>JavaFX 8.0</dd>",
+                "<p>Sets the value of the property <code>Property</code>",
+                "<p>Gets the value of the property <code>Property</code>",
+                "<span class=\"simpleTagLabel\">Property description:</span>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"C.html#setTestMethodProperty--\">setTestMethodProperty</a></span>()</code>&nbsp;</td>",
+                "<h4>isPaused</h4>\n"
+                + "<pre>public final&nbsp;double&nbsp;isPaused()</pre>\n"
+                + "<div class=\"block\">Gets the value of the property paused.</div>");
 
-
-    private static final String[] ARGS = new String[] {
-        "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-javafx",
-        SRC_DIR + "/C.java", SRC_DIR + "/D.java"
-    };
+        checkOutput("C.html", false,
+                "A()");
 
-    /**
-     * The entry point of the test.
-     * @param args the array of command line arguments.
-     */
-    public static void main(String[] args) {
-        TestJavaFX tester = new TestJavaFX();
-        tester.run(ARGS, TEST, NO_TEST);
-        tester.printSummary();
+        checkOutput("D.html", true,
+                "<h3>Properties inherited from class&nbsp;<a href=\"C.html\" title=\"class in &lt;Unnamed&gt;\">C</a></h3>\n"
+                + "<code><a href=\"C.html#pausedProperty\">paused</a>, <a href=\"C.html#rateProperty\">rate</a></code></li>");
     }
+
 }