1 /* |
1 /* |
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4780441 4874845 4978816 |
26 * @bug 4780441 4874845 4978816 8014017 |
27 * @summary Make sure that when the -private flag is not used, members |
27 * @summary Make sure that when the -private flag is not used, members |
28 * inherited from package private class are documented in the child. |
28 * inherited from package private class are documented in the child. |
29 * |
29 * |
30 * Make sure that when a method inherits documentation from a method |
30 * Make sure that when a method inherits documentation from a method |
31 * in a non-public class/interface, the non-public class/interface |
31 * in a non-public class/interface, the non-public class/interface |
32 * is not mentioned anywhere (not even in the signature or tree). |
32 * is not mentioned anywhere (not even in the signature or tree). |
33 * |
33 * |
34 * Make sure that when a private interface method with generic parameters |
34 * Make sure that when a private interface method with generic parameters |
35 * is implemented, the comments can be inherited properly. |
35 * is implemented, the comments can be inherited properly. |
|
36 * |
|
37 * Make sure when no modifier appear in the class signature, the |
|
38 * signature is displayed correctly without extra space at the beginning. |
36 * @author jamieh |
39 * @author jamieh |
37 * @library ../lib/ |
40 * @library ../lib/ |
38 * @build JavadocTester |
41 * @build JavadocTester TestPrivateClasses |
39 * @build TestPrivateClasses |
|
40 * @run main TestPrivateClasses |
42 * @run main TestPrivateClasses |
41 */ |
43 */ |
42 |
44 |
43 public class TestPrivateClasses extends JavadocTester { |
45 public class TestPrivateClasses extends JavadocTester { |
44 |
46 |
45 //Test information. |
47 //Test information. |
46 private static final String BUG_ID = "4780441-4874845-4978816"; |
48 private static final String BUG_ID = "4780441-4874845-4978816-8014017"; |
47 |
49 |
48 //Javadoc arguments. |
50 //Javadoc arguments. |
49 private static final String[] ARGS1 = new String[] { |
51 private static final String[] ARGS1 = new String[] { |
50 "-d", BUG_ID + "-1", "-sourcepath", SRC_DIR, "-source", "1.5", "pkg", "pkg2" |
52 "-d", BUG_ID + "-1", "-sourcepath", SRC_DIR, "-source", "1.5", "pkg", "pkg2" |
51 }; |
53 }; |
232 "<dt><strong>Specified by:</strong></dt>" + NL + |
234 "<dt><strong>Specified by:</strong></dt>" + NL + |
233 "<dd><code><a href=\"../pkg2/I.html#hello(T)\">hello</a></code>" + |
235 "<dd><code><a href=\"../pkg2/I.html#hello(T)\">hello</a></code>" + |
234 " in interface <code>" + |
236 " in interface <code>" + |
235 "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" + |
237 "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" + |
236 "<java.lang.String></code></dd>"}, |
238 "<java.lang.String></code></dd>"}, |
237 }; |
239 |
238 private static final String[][] NEGATED_TEST2 = NO_TEST; |
240 //Make sure when no modifier appear in the class signature, the |
|
241 //signature is displayed correctly without extra space at the beginning. |
|
242 {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateParent.html", |
|
243 "<pre>class <span class=\"strong\">PrivateParent</span>"}, |
|
244 |
|
245 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", |
|
246 "<pre>public class <span class=\"strong\">PublicChild</span>"}, |
|
247 }; |
|
248 private static final String[][] NEGATED_TEST2 = { |
|
249 {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateParent.html", |
|
250 "<pre> class <span class=\"strong\">PrivateParent</span>"}, |
|
251 }; |
239 |
252 |
240 /** |
253 /** |
241 * The entry point of the test. |
254 * The entry point of the test. |
242 * @param args the array of command line arguments. |
255 * @param args the array of command line arguments. |
243 */ |
256 */ |