author | bpatel |
Tue, 06 Mar 2018 10:45:47 -0800 | |
changeset 49139 | 771616d26ca1 |
parent 48654 | 36f58bd6269f |
child 53097 | 2e82ca64b25d |
permissions | -rw-r--r-- |
9592
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
1 |
/* |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2011, 2018, 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 |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
26 |
* @bug 6758050 8025633 8182765 |
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 |
36526 | 30 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
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 " + |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
51 |
"href=\"#foo(java.util.Map)\"><code>foo" + |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
52 |
"(java.util.Map<A, java.util.Map<A, A>>)</code></a></div>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
53 |
} |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
54 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
55 |
@Test |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
56 |
void test_html4() { |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
57 |
javadoc("-d", "out-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
58 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
59 |
"-sourcepath", testSrc, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
60 |
"pkg"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
61 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
62 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
63 |
checkOutput("pkg/NestedGenerics.html", true, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
64 |
"<div class=\"block\">Contains <a " + |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47216
diff
changeset
|
65 |
"href=\"#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
|
66 |
"(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
|
67 |
} |
82e14c156b3b
6758050: javadoc handles nested generic types incorrectly
bpatel
parents:
diff
changeset
|
68 |
} |