langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java
changeset 24399 af1a0220d0fa
parent 24072 e7549dcbc4af
child 30730 d3ce7619db2c
--- a/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java	Fri May 09 23:31:05 2014 +0200
+++ b/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java	Fri May 09 15:37:12 2014 -0700
@@ -29,49 +29,41 @@
  *           Run Javadoc on some sample source that uses {@inheritDoc}.  Make
  *           sure that only the first sentence shows up in the summary table.
  * @author   jamieh
- * @library  ../lib/
- * @build    JavadocTester
- * @build    TestTaglets
- * @build    taglets.Foo
+ * @library  ../lib
+ * @build    JavadocTester taglets.Foo
  * @run main TestTaglets
  */
 
 public class TestTaglets extends JavadocTester {
 
-    //Javadoc arguments.
-    private static final String[] ARGS_4654308 = new String[] {
-        "-d", "4654308", "-tagletpath", SRC_DIR, "-taglet", "taglets.Foo",
-        "-sourcepath", SRC_DIR, SRC_DIR + "/C.java"
-    };
+    public static void main(String... args) throws Exception {
+        TestTaglets tester = new TestTaglets();
+        tester.runTests();
+    }
 
-    private static final String[] ARGS_4767038 = new String[] {
-        "-d", "4767038", "-sourcepath", SRC_DIR, SRC_DIR + "/Parent.java",
-        SRC_DIR + "/Child.java"
-    };
-
-    //Input for string search tests.
-    private static final String[][] TEST_4654308 = new String[][] {
-        { "C.html", "<span class=\"simpleTagLabel\">Foo:</span></dt>" +
-                 "<dd>my only method is <a href=\"C.html#method--\"><code>here" +
-                 "</code></a></dd></dl>"}
-    };
+    @Test
+    void test_4654308() {
+        javadoc("-d", "out-4654308",
+                "-tagletpath", testSrc, // TODO: probably does no good
+                "-taglet", "taglets.Foo",
+                "-sourcepath", testSrc,
+                testSrc("C.java"));
+        checkExit(Exit.OK);
 
-    private static final String[][] TEST_4767038 = new String[][] {
-        { "Child.html",
-            "This is the first sentence."}
-    };
-
+        checkOutput("C.html", true,
+                "<span class=\"simpleTagLabel\">Foo:</span></dt>"
+                + "<dd>my only method is <a href=\"C.html#method--\"><code>here"
+                + "</code></a></dd></dl>");
+    }
 
-    /**
-     * The entry point of the test.
-     * @param args the array of command line arguments.
-     */
-    public static void main(String[] args) {
-        TestTaglets tester = new TestTaglets();
-        tester.run(ARGS_4654308, TEST_4654308, NO_TEST);
-        tester.printSummary();
-        tester = new TestTaglets();
-        tester.run(ARGS_4767038, TEST_4767038, NO_TEST);
-        tester.printSummary();
+    @Test
+    void test_4767038() {
+        javadoc("-d", "out-4767038",
+                "-sourcepath", testSrc,
+                testSrc("Parent.java"), testSrc("Child.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("Child.html", true,
+                "This is the first sentence.");
     }
 }