34 * @run main TestParamTaglet |
34 * @run main TestParamTaglet |
35 */ |
35 */ |
36 |
36 |
37 public class TestParamTaglet extends JavadocTester { |
37 public class TestParamTaglet extends JavadocTester { |
38 |
38 |
39 //Test information. |
|
40 private static final String BUG_ID = "4802275-4967243"; |
|
41 |
|
42 //Javadoc arguments. |
39 //Javadoc arguments. |
43 private static final String[] ARGS = new String[] { |
40 private static final String[] ARGS = new String[] { |
44 "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" |
41 "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg" |
45 }; |
42 }; |
46 |
43 |
47 //Input for string search tests. |
44 //Input for string search tests. |
48 private static final String[][] TEST = { |
45 private static final String[][] TEST = { |
49 //Regular param tags. |
46 //Regular param tags. |
50 {BUG_ID + "/pkg/C.html", |
47 { "pkg/C.html", |
51 "<span class=\"paramLabel\">Parameters:</span></dt>\n" + |
48 "<span class=\"paramLabel\">Parameters:</span></dt>\n" + |
52 "<dd><code>param1</code> - testing 1 2 3.</dd>\n" + |
49 "<dd><code>param1</code> - testing 1 2 3.</dd>\n" + |
53 "<dd><code>param2</code> - testing 1 2 3." |
50 "<dd><code>param2</code> - testing 1 2 3." |
54 }, |
51 }, |
55 //Param tags that don't match with any real parameters. |
52 //Param tags that don't match with any real parameters. |
56 {BUG_ID + "/pkg/C.html", |
53 { "pkg/C.html", |
57 "<span class=\"paramLabel\">Parameters:</span></dt>\n" + |
54 "<span class=\"paramLabel\">Parameters:</span></dt>\n" + |
58 "<dd><code><I>p1</I></code> - testing 1 2 3.</dd>\n" + |
55 "<dd><code><I>p1</I></code> - testing 1 2 3.</dd>\n" + |
59 "<dd><code><I>p2</I></code> - testing 1 2 3." |
56 "<dd><code><I>p2</I></code> - testing 1 2 3." |
60 }, |
57 }, |
61 //{@inherit} doc misuse does not cause doclet to throw exception. |
58 //{@inherit} doc misuse does not cause doclet to throw exception. |
62 // Param is printed with nothing inherited. |
59 // Param is printed with nothing inherited. |
63 //XXX: in the future when Configuration is available during doc inheritence, |
60 //XXX: in the future when Configuration is available during doc inheritence, |
64 //print a warning for this mistake. |
61 //print a warning for this mistake. |
65 {BUG_ID + "/pkg/C.html", |
62 { "pkg/C.html", |
66 "<code><I>inheritBug</I></code> -" |
63 "<code><I>inheritBug</I></code> -" |
67 }, |
64 }, |
68 |
65 |
69 }; |
66 }; |
70 |
67 |
75 public static void main(String[] args) { |
72 public static void main(String[] args) { |
76 TestParamTaglet tester = new TestParamTaglet(); |
73 TestParamTaglet tester = new TestParamTaglet(); |
77 tester.run(ARGS, TEST, NO_TEST); |
74 tester.run(ARGS, TEST, NO_TEST); |
78 tester.printSummary(); |
75 tester.printSummary(); |
79 } |
76 } |
80 |
|
81 /** |
|
82 * {@inheritDoc} |
|
83 */ |
|
84 public String getBugId() { |
|
85 return BUG_ID; |
|
86 } |
|
87 |
|
88 /** |
|
89 * {@inheritDoc} |
|
90 */ |
|
91 public String getBugName() { |
|
92 return getClass().getName(); |
|
93 } |
|
94 } |
77 } |