30 * @build TestTagMisuse |
30 * @build TestTagMisuse |
31 * @run main TestTagMisuse |
31 * @run main TestTagMisuse |
32 */ |
32 */ |
33 public class TestTagMisuse extends JavadocTester { |
33 public class TestTagMisuse extends JavadocTester { |
34 |
34 |
35 private static final String BUG_ID = "no-bug-id"; |
|
36 private static final String[][] TEST = { |
35 private static final String[][] TEST = { |
37 {WARNING_OUTPUT, "warning - Tag @param cannot be used in field documentation."}, |
36 {WARNING_OUTPUT, "warning - Tag @param cannot be used in field documentation."}, |
38 {WARNING_OUTPUT, "warning - Tag @throws cannot be used in field documentation."}, |
37 {WARNING_OUTPUT, "warning - Tag @throws cannot be used in field documentation."}, |
39 {WARNING_OUTPUT, "warning - Tag @return cannot be used in constructor documentation."}, |
38 {WARNING_OUTPUT, "warning - Tag @return cannot be used in constructor documentation."}, |
40 {WARNING_OUTPUT, "warning - Tag @throws cannot be used in inline documentation."}, |
39 {WARNING_OUTPUT, "warning - Tag @throws cannot be used in inline documentation."}, |
41 }; |
40 }; |
42 private static final String[] ARGS = new String[] { |
41 private static final String[] ARGS = new String[] { |
43 "-Xdoclint:none", "-d", BUG_ID, SRC_DIR + "/TestTagMisuse.java" |
42 "-Xdoclint:none", "-d", OUTPUT_DIR, SRC_DIR + "/TestTagMisuse.java" |
44 }; |
43 }; |
45 |
44 |
46 /** |
45 /** |
47 * The entry point of the test. |
46 * The entry point of the test. |
48 * @param args the array of command line arguments. |
47 * @param args the array of command line arguments. |
49 */ |
48 */ |
50 public static void main(String[] args) { |
49 public static void main(String[] args) { |
51 TestTagMisuse tester = new TestTagMisuse(); |
50 TestTagMisuse tester = new TestTagMisuse(); |
52 tester.run(ARGS, TEST, NO_TEST); |
51 tester.run(ARGS, TEST, NO_TEST); |
53 tester.printSummary(); |
52 tester.printSummary(); |
54 } |
|
55 |
|
56 /** |
|
57 * {@inheritDoc} |
|
58 */ |
|
59 public String getBugId() { |
|
60 return BUG_ID; |
|
61 } |
|
62 |
|
63 /** |
|
64 * {@inheritDoc} |
|
65 */ |
|
66 public String getBugName() { |
|
67 return getClass().getName(); |
|
68 } |
53 } |
69 |
54 |
70 /** |
55 /** |
71 * {@throws blah} |
56 * {@throws blah} |
72 * Here is a bad field tag: |
57 * Here is a bad field tag: |