author | vtewari |
Tue, 24 May 2016 12:31:30 +0100 | |
changeset 38477 | f462865d453d |
parent 30730 | d3ce7619db2c |
permissions | -rw-r--r-- |
9592
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
1 |
/* |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
24399
diff
changeset
|
2 |
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
9592
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
4 |
* |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
8 |
* |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
13 |
* accompanied this code). |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
14 |
* |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
18 |
* |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
21 |
* questions. |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
22 |
*/ |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
23 |
|
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
24 |
/* |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
25 |
* @test |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
9592
diff
changeset
|
26 |
* @bug 6758050 8025633 |
9592
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
27 |
* @summary Test HTML output for nested generic types. |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
28 |
* @author bpatel |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
29 |
* @library ../lib |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
24399
diff
changeset
|
30 |
* @modules jdk.javadoc |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
31 |
* @build JavadocTester |
9592
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
32 |
* @run main TestNestedGenerics |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
33 |
*/ |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
34 |
|
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
35 |
public class TestNestedGenerics extends JavadocTester { |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
36 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
37 |
public static void main(String... args) throws Exception { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
38 |
TestNestedGenerics tester = new TestNestedGenerics(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
39 |
tester.runTests(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
40 |
} |
9592
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
41 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
42 |
@Test |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
43 |
void test() { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
44 |
javadoc("-d", "out", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
45 |
"-sourcepath", testSrc, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
46 |
"pkg"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
47 |
checkExit(Exit.OK); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
48 |
|
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
49 |
checkOutput("pkg/NestedGenerics.html", true, |
9592
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
50 |
"<div class=\"block\">Contains <a " + |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
9592
diff
changeset
|
51 |
"href=\"../pkg/NestedGenerics.html#foo-java.util.Map-\"><code>foo" + |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
52 |
"(java.util.Map<A, java.util.Map<A, A>>)</code></a></div>"); |
9592
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
53 |
} |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
54 |
} |