|
1 /* |
|
2 * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. |
|
8 * |
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
|
13 * accompanied this code). |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License version |
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 * |
|
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
20 * CA 95054 USA or visit www.sun.com if you need additional information or |
|
21 * have any questions. |
|
22 */ |
|
23 |
|
24 /* |
|
25 * @test |
|
26 * @bug 4637604 4775148 |
|
27 * @summary Test the tables for summary="" |
|
28 * @author dkramer |
|
29 * @library ../lib/ |
|
30 * @build JavadocTester |
|
31 * @build AccessSummary |
|
32 * @run main AccessSummary |
|
33 */ |
|
34 |
|
35 public class AccessSummary extends JavadocTester { |
|
36 |
|
37 private static final String BUG_ID = "4637604-4775148"; |
|
38 private static final String OUTPUT_DIR1 = "docs1-" + BUG_ID + FS; |
|
39 |
|
40 /** |
|
41 * Assign value for [ fileToSearch, stringToFind ] |
|
42 */ |
|
43 private static final String[][] TESTARRAY1 = { |
|
44 |
|
45 // Test that the summary attribute appears |
|
46 { OUTPUT_DIR1 + "overview-summary.html", |
|
47 "SUMMARY=\"\"" }, |
|
48 |
|
49 // Test that the summary attribute appears |
|
50 { OUTPUT_DIR1 + "p1" + FS + "C1.html", |
|
51 "SUMMARY=\"\"" }, |
|
52 |
|
53 // Test that the summary attribute appears |
|
54 { OUTPUT_DIR1 + "constant-values.html", |
|
55 "SUMMARY=\"\"" } |
|
56 }; |
|
57 |
|
58 // First test with -header only |
|
59 private static final String[] JAVADOC_ARGS = new String[] { |
|
60 "-d", OUTPUT_DIR1, |
|
61 "-sourcepath", SRC_DIR, |
|
62 "p1", "p2"}; |
|
63 |
|
64 /** |
|
65 * The entry point of the test. |
|
66 * @param args the array of command line arguments. |
|
67 */ |
|
68 public static void main(String[] args) { |
|
69 JavadocTester tester = new AccessSummary(); |
|
70 run(tester, JAVADOC_ARGS, TESTARRAY1, new String[][] {}); |
|
71 tester.printSummary(); // Necessary for string search |
|
72 } |
|
73 |
|
74 /** |
|
75 * {@inheritDoc} |
|
76 */ |
|
77 public String getBugId() { |
|
78 return BUG_ID; |
|
79 } |
|
80 |
|
81 /** |
|
82 * {@inheritDoc} |
|
83 */ |
|
84 public String getBugName() { |
|
85 return getClass().getName(); |
|
86 } |
|
87 } |