21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4638723 |
26 * @bug 4638723 8015882 |
27 * @summary Test to ensure that the refactored version of the standard |
27 * @summary Test to ensure that the refactored version of the standard |
28 * doclet still works with Taglets that implement the 1.4.0 interface. |
28 * doclet still works with Taglets that implement the 1.4.0 interface. |
29 * @author jamieh |
29 * @author jamieh |
30 * @library ../lib/ |
30 * @library ../lib/ |
31 * @compile ../lib/JavadocTester.java |
31 * @compile ../lib/JavadocTester.java TestLegacyTaglet.java ToDoTaglet.java UnderlineTaglet.java Check.java |
32 * @compile TestLegacyTaglet.java |
|
33 * @compile ToDoTaglet.java |
|
34 * @compile UnderlineTaglet.java |
|
35 * @run main TestLegacyTaglet |
32 * @run main TestLegacyTaglet |
36 */ |
33 */ |
37 |
34 |
38 public class TestLegacyTaglet extends JavadocTester { |
35 public class TestLegacyTaglet extends JavadocTester { |
39 |
36 |
40 private static final String BUG_ID = "4638723"; |
37 private static final String BUG_ID = "4638723-8015882"; |
41 |
38 |
42 private static final String[] ARGS = |
39 private static final String[] ARGS = |
43 new String[] {"-d", BUG_ID, "-sourcepath", SRC_DIR, |
40 new String[] {"-d", BUG_ID, "-sourcepath", SRC_DIR, |
44 "-tagletpath", SRC_DIR, "-taglet", "ToDoTaglet", |
41 "-tagletpath", SRC_DIR, "-taglet", "ToDoTaglet", "-taglet", "Check", |
45 "-taglet", "UnderlineTaglet", SRC_DIR + FS + "C.java"}; |
42 "-taglet", "UnderlineTaglet", SRC_DIR + FS + "C.java"}; |
46 |
43 |
47 private static final String[][] TEST = new String[][] { |
44 private static final String[][] TEST = new String[][] { |
48 {BUG_ID + FS + "C.html", "This is an <u>underline</u>"}, |
45 {BUG_ID + FS + "C.html", "This is an <u>underline</u>"}, |
49 {BUG_ID + FS + "C.html", |
46 {BUG_ID + FS + "C.html", |
50 "<DT><B>To Do:</B><DD><table cellpadding=2 cellspacing=0><tr>" + |
47 "<DT><B>To Do:</B><DD><table cellpadding=2 cellspacing=0><tr>" + |
51 "<td bgcolor=\"yellow\">Finish this class.</td></tr></table></DD>"}}; |
48 "<td bgcolor=\"yellow\">Finish this class.</td></tr></table></DD>"}, |
|
49 {BUG_ID + FS + "C.html", |
|
50 "<DT><B>To Do:</B><DD><table cellpadding=2 cellspacing=0><tr>" + |
|
51 "<td bgcolor=\"yellow\">Tag in Method.</td></tr></table></DD>"} |
|
52 }; |
52 |
53 |
53 private static final String[][] NEGATED_TEST = NO_TEST; |
54 private static final String[][] NEGATED_TEST = NO_TEST; |
54 |
55 |
55 /** |
56 /** |
56 * The entry point of the test. |
57 * The entry point of the test. |
57 * @param args the array of command line arguments. |
58 * @param args the array of command line arguments. |
58 */ |
59 */ |
59 public static void main(String[] args) { |
60 public static void main(String[] args) { |
60 TestLegacyTaglet tester = new TestLegacyTaglet(); |
61 TestLegacyTaglet tester = new TestLegacyTaglet(); |
61 run(tester, ARGS, TEST, NEGATED_TEST); |
62 run(tester, ARGS, TEST, NEGATED_TEST); |
|
63 if (tester.getErrorOutput().contains("NullPointerException")) { |
|
64 throw new AssertionError("javadoc threw NullPointerException"); |
|
65 } |
62 tester.printSummary(); |
66 tester.printSummary(); |
63 } |
67 } |
64 |
68 |
65 /** |
69 /** |
66 * {@inheritDoc} |
70 * {@inheritDoc} |