test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java

changeset 1935
8c55df2442c1
parent 798
4868a36f6fd8
child 2101
933ba3f81a87
equal deleted inserted replaced
1934:c7dcf899ffff 1935:8c55df2442c1
1 /* 1 /*
2 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2002, 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.
38 private static final String BUG_ID = "4634891"; 38 private static final String BUG_ID = "4634891";
39 39
40 private static final String[][] TEST = { 40 private static final String[][] TEST = {
41 //The public method should be overriden 41 //The public method should be overriden
42 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 42 {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
43 "<dt><strong>Overrides:</strong></dt>" + NL + 43 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
44 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" + 44 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" +
45 "publicMethod</a></code>&nbsp;in class&nbsp;<code>" + 45 "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
46 "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}, 46 "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
47 47
48 //The public method in different package should be overriden 48 //The public method in different package should be overriden
49 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 49 {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
50 "<dt><strong>Overrides:</strong></dt>" + NL + 50 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
51 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" + 51 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" +
52 "publicMethod</a></code>&nbsp;in class&nbsp;<code>" + 52 "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
53 "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}, 53 "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
54 54
55 //The package private method should be overriden since the base and sub class are in the same 55 //The package private method should be overriden since the base and sub class are in the same
56 //package. 56 //package.
57 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 57 {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
58 "<dt><strong>Overrides:</strong></dt>" + NL + 58 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
59 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">" + 59 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">" +
60 "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>" + 60 "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>" +
61 "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"} 61 "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}
62 }; 62 };
63 63
64 private static final String[][] NEGATED_TEST = { 64 private static final String[][] NEGATED_TEST = {
65 65
66 //The private method in should not be overriden 66 //The private method in should not be overriden
67 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 67 {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
68 "<dt><strong>Overrides:</strong></dt>" + NL + 68 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
69 "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"}, 69 "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"},
70 70
71 //The private method in different package should not be overriden 71 //The private method in different package should not be overriden
72 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 72 {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
73 "<dt><strong>Overrides:</strong></dt>" + NL + 73 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
74 "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"}, 74 "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"},
75 75
76 //The package private method should not be overriden since the base and sub class are in 76 //The package private method should not be overriden since the base and sub class are in
77 //different packages. 77 //different packages.
78 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 78 {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
79 "<dt><strong>Overrides:</strong></dt>" + NL + 79 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
80 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">"}, 80 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">"},
81 }; 81 };
82 82
83 private static final String[] ARGS = 83 private static final String[] ARGS =
84 new String[] { 84 new String[] {

mercurial