24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4525364 |
26 * @bug 4525364 |
27 * @summary Determine if duplicate throws tags can be used. |
27 * @summary Determine if duplicate throws tags can be used. |
28 * @author jamieh |
28 * @author jamieh |
29 * @library ../lib/ |
29 * @library ../lib |
30 * @build JavadocTester |
30 * @build JavadocTester |
31 * @build TestDupThrowsTags |
|
32 * @run main TestDupThrowsTags |
31 * @run main TestDupThrowsTags |
33 */ |
32 */ |
34 public class TestDupThrowsTags extends JavadocTester { |
33 public class TestDupThrowsTags extends JavadocTester { |
35 |
34 |
36 private static final String[] ARGS = new String[] { |
35 public static void main(String... args) throws Exception { |
37 "-d", OUTPUT_DIR, SRC_DIR + "/TestDupThrowsTags.java" |
36 TestDupThrowsTags tester = new TestDupThrowsTags(); |
38 }; |
37 tester.runTests(); |
|
38 } |
39 |
39 |
40 /** |
40 @Test |
41 * The entry point of the test. |
41 void test() { |
42 * @param args the array of command line arguments. |
42 javadoc("-d", "out", |
43 */ |
43 testSrc("TestDupThrowsTags.java")); |
44 public static void main(String[] args) { |
44 checkExit(Exit.FAILED); |
45 String[][] tests = new String[4][2]; |
45 |
46 for (int i = 0; i < tests.length; i++) { |
46 checkOutput("TestDupThrowsTags.html", true, |
47 tests[i][0] = "TestDupThrowsTags.html"; |
47 "Test 1 passes", |
48 tests[i][1] = "Test "+(i+1)+" passes"; |
48 "Test 2 passes", |
49 } |
49 "Test 3 passes", |
50 TestDupThrowsTags tester = new TestDupThrowsTags(); |
50 "Test 4 passes"); |
51 tester.run(ARGS, tests, NO_TEST); |
|
52 tester.printSummary(); |
|
53 } |
51 } |
54 |
52 |
55 /** |
53 /** |
56 * @throws java.io.IOException Test 1 passes |
54 * @throws java.io.IOException Test 1 passes |
57 * @throws java.io.IOException Test 2 passes |
55 * @throws java.io.IOException Test 2 passes |
58 * @throws java.lang.NullPointerException Test 3 passes |
56 * @throws java.lang.NullPointerException Test 3 passes |
59 * @throws java.io.IOException Test 4 passes |
57 * @throws java.io.IOException Test 4 passes |
60 */ |
58 */ |
61 public void method(){} |
59 public void method() {} |
62 |
60 |
63 } |
61 } |