author | katleman |
Tue, 21 Jan 2014 18:17:23 -0800 | |
changeset 22365 | 895bfde469d4 |
parent 7681 | 1f0819a3341f |
child 23971 | f5ff1f5a8dee |
permissions | -rw-r--r-- |
10 | 1 |
/* |
7681 | 2 |
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. |
10 | 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 |
* |
|
5520 | 19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
10 | 22 |
*/ |
23 |
||
24 |
/* |
|
25 |
* @test |
|
26 |
* @bug 4637604 4775148 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
27 |
* @summary Test the tables for summary attribute |
10 | 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", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
47 |
"summary=\"Packages table, listing packages, and an explanation\"" }, |
10 | 48 |
|
49 |
// Test that the summary attribute appears |
|
50 |
{ OUTPUT_DIR1 + "p1" + FS + "C1.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
51 |
"summary=\"Constructor Summary table, listing constructors, and an explanation\"" }, |
10 | 52 |
|
53 |
// Test that the summary attribute appears |
|
54 |
{ OUTPUT_DIR1 + "constant-values.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
55 |
"summary=\"Constant Field Values table, listing constant fields, and values\"" } |
10 | 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 |
} |