24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4074234 |
26 * @bug 4074234 |
27 * @summary Make Javadoc capable of traversing/recursing all of given subpackages. |
27 * @summary Make Javadoc capable of traversing/recursing all of given subpackages. |
28 * @author jamieh |
28 * @author jamieh |
29 * @library ../lib/ |
29 * @library ../lib |
30 * @build JavadocTester |
30 * @build JavadocTester |
31 * @build TestRecurseSubPackages |
|
32 * @run main TestRecurseSubPackages |
31 * @run main TestRecurseSubPackages |
33 */ |
32 */ |
34 |
33 |
35 public class TestRecurseSubPackages extends JavadocTester { |
34 public class TestRecurseSubPackages extends JavadocTester { |
36 |
35 |
37 private static final String[] ARGS = |
36 public static void main(String... args) throws Exception { |
38 new String[] { |
37 TestRecurseSubPackages tester = new TestRecurseSubPackages(); |
39 "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, |
38 tester.runTests(); |
40 "-subpackages", "pkg1", "-exclude", "pkg1.pkg2.packageToExclude" |
39 } |
41 }; |
|
42 |
40 |
43 /** |
41 @Test |
44 * The entry point of the test. |
42 void test() { |
45 * @param args the array of command line arguments. |
43 javadoc("-d", "out", |
46 */ |
44 "-sourcepath", testSrc, |
47 public static void main(String[] args) { |
45 "-subpackages", "pkg1", |
48 String[][] tests = new String[6][2]; |
46 "-exclude", "pkg1.pkg2.packageToExclude"); |
49 for (int i = 0; i < tests.length; i++) { |
47 checkExit(Exit.OK); |
50 tests[i][0] = "allclasses-frame.html"; |
48 |
51 tests[i][1] = "C" + (i+1) + ".html"; |
49 for (int i = 1; i <= 6; i++) { |
|
50 checkOutput("allclasses-frame.html", true, |
|
51 "C" + i + ".html"); |
52 } |
52 } |
53 String[][] negatedTests = new String[][] { |
53 |
54 { "allclasses-frame.html", "DummyClass.html"} |
54 checkOutput("allclasses-frame.html", false, |
55 }; |
55 "DummyClass.html"); |
56 TestRecurseSubPackages tester = new TestRecurseSubPackages(); |
|
57 tester.run(ARGS, tests, negatedTests); |
|
58 tester.printSummary(); |
|
59 } |
56 } |
|
57 |
60 } |
58 } |