author | ksrini |
Fri, 05 Aug 2011 19:41:05 -0700 | |
changeset 10203 | cca843a7d258 |
parent 7681 | 1f0819a3341f |
child 19119 | 3c2e9a2bbed6 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
10203
cca843a7d258
7064544: (javadoc) miscellaneous fixes requested by netbeans
ksrini
parents:
7681
diff
changeset
|
2 |
* Copyright (c) 2004, 2011, 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 |
|
10203
cca843a7d258
7064544: (javadoc) miscellaneous fixes requested by netbeans
ksrini
parents:
7681
diff
changeset
|
26 |
* @bug 4732864 6280605 7064544 |
10 | 27 |
* @summary Make sure that you can link from one member to another using |
10203
cca843a7d258
7064544: (javadoc) miscellaneous fixes requested by netbeans
ksrini
parents:
7681
diff
changeset
|
28 |
* non-qualified name, furthermore, ensure the right one is linked. |
10 | 29 |
* @author jamieh |
30 |
* @library ../lib/ |
|
31 |
* @build JavadocTester |
|
32 |
* @build TestLinkTaglet |
|
33 |
* @run main TestLinkTaglet |
|
34 |
*/ |
|
35 |
||
36 |
public class TestLinkTaglet extends JavadocTester { |
|
37 |
||
38 |
//Test information. |
|
10203
cca843a7d258
7064544: (javadoc) miscellaneous fixes requested by netbeans
ksrini
parents:
7681
diff
changeset
|
39 |
private static final String BUG_ID = "4732864-6280605-7064544"; |
10 | 40 |
|
41 |
//Javadoc arguments. |
|
42 |
private static final String[] ARGS = new String[] { |
|
43 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", SRC_DIR + FS + "checkPkg" + FS + "B.java" |
|
44 |
}; |
|
45 |
||
46 |
//Input for string search tests. |
|
47 |
private static final String[][] TEST = { |
|
48 |
{BUG_ID + FS + "pkg" + FS + "C.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
49 |
"Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
50 |
" Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
51 |
" Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
52 |
" Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
53 |
" Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
54 |
" Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>" |
10 | 55 |
}, |
56 |
{BUG_ID + FS + "pkg" + FS + "C.InnerC.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
57 |
"Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>\n" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
58 |
" Link to member in inner class: <a href=\"../pkg/C.InnerC2.html#MEMBER2\"><code>C.InnerC2.MEMBER2</code></a> <br/>\n" + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
59 |
" Link to another inner class: <a href=\"../pkg/C.InnerC2.html\" title=\"class in pkg\"><code>C.InnerC2</code></a>" |
10 | 60 |
}, |
61 |
{BUG_ID + FS + "pkg" + FS + "C.InnerC2.html", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
62 |
"<dl>" + NL + "<dt>Enclosing class:</dt>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
63 |
"<dd><a href=\"../pkg/C.html\" title=\"class in pkg\">C</a></dd>" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
64 |
"</dl>" |
10 | 65 |
}, |
66 |
}; |
|
67 |
private static final String[][] NEGATED_TEST = { |
|
68 |
{WARNING_OUTPUT, "Tag @see: reference not found: A"}, |
|
69 |
}; |
|
70 |
||
71 |
/** |
|
72 |
* The entry point of the test. |
|
73 |
* @param args the array of command line arguments. |
|
74 |
*/ |
|
75 |
public static void main(String[] args) { |
|
76 |
TestLinkTaglet tester = new TestLinkTaglet(); |
|
77 |
run(tester, ARGS, TEST, NEGATED_TEST); |
|
78 |
tester.printSummary(); |
|
79 |
} |
|
80 |
||
81 |
/** |
|
82 |
* {@inheritDoc} |
|
83 |
*/ |
|
84 |
public String getBugId() { |
|
85 |
return BUG_ID; |
|
86 |
} |
|
87 |
||
88 |
/** |
|
89 |
* {@inheritDoc} |
|
90 |
*/ |
|
91 |
public String getBugName() { |
|
92 |
return getClass().getName(); |
|
93 |
} |
|
94 |
} |