Thu, 15 Jul 2010 16:31:02 +0100
6967002: JDK7 b99 javac compilation error (java.lang.AssertionError)
Summary: bug in JavacParser related to parsing of type annotations in varargs position
Reviewed-by: jjg
Contributed-by: mahmood@notnoop.com
1 /*
2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. 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. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 /*
27 * @test
28 * @bug 6786028
29 * @summary This test verifys the use of <strong> HTML tag instead of <B> by Javadoc std doclet.
30 * @author Bhavesh Patel
31 * @library ../lib/
32 * @build JavadocTester
33 * @build TestHtmlStrongTag
34 * @run main TestHtmlStrongTag
35 */
37 public class TestHtmlStrongTag extends JavadocTester {
39 private static final String BUG_ID = "6786028";
40 private static final String[][] TEST1 = {
41 {BUG_ID + FS + "pkg1" + FS + "C1.html", "<STRONG>See Also:</STRONG>"}};
42 private static final String[][] NEGATED_TEST1 = {
43 {BUG_ID + FS + "pkg1" + FS + "C1.html", "<STRONG>Method Summary</STRONG>"},
44 {BUG_ID + FS + "pkg1" + FS + "C1.html", "<B>"},
45 {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<STRONG>Class Summary</STRONG>"}};
46 private static final String[][] TEST2 = {
47 {BUG_ID + FS + "pkg2" + FS + "C2.html", "<B>Comments:</B>"}};
48 private static final String[][] NEGATED_TEST2 = {
49 {BUG_ID + FS + "pkg2" + FS + "C2.html", "<STRONG>Method Summary</STRONG>"},
50 {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<STRONG>Class Summary</STRONG>"}};
52 private static final String[] ARGS1 =
53 new String[] {
54 "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"};
55 private static final String[] ARGS2 =
56 new String[] {
57 "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg2"};
59 /**
60 * The entry point of the test.
61 * @param args the array of command line arguments.
62 */
63 public static void main(String[] args) {
64 TestHtmlStrongTag tester = new TestHtmlStrongTag();
65 run(tester, ARGS1, TEST1, NEGATED_TEST1);
66 run(tester, ARGS2, TEST2, NEGATED_TEST2);
67 tester.printSummary();
68 }
70 /**
71 * {@inheritDoc}
72 */
73 public String getBugId() {
74 return BUG_ID;
75 }
77 /**
78 * {@inheritDoc}
79 */
80 public String getBugName() {
81 return getClass().getName();
82 }
83 }