author | bpatel |
Wed, 15 Mar 2017 16:12:20 -0700 | |
changeset 44297 | e03f5fb3714b |
parent 36526 | 3b41f1c69604 |
permissions | -rw-r--r-- |
17545 | 1 |
/* |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
2 |
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. |
17545 | 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 |
* |
|
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. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
26 |
* @bug 8002387 8014636 8078320 8175200 |
17545 | 27 |
* @summary Improve rendered HTML formatting for {@code} |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
28 |
* @library ../lib |
36526 | 29 |
* @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
|
30 |
* @build JavadocTester |
17545 | 31 |
* @run main TestLiteralCodeInPre |
32 |
*/ |
|
33 |
||
34 |
public class TestLiteralCodeInPre extends JavadocTester { |
|
35 |
||
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
36 |
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
|
37 |
TestLiteralCodeInPre tester = new TestLiteralCodeInPre(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
38 |
tester.runTests(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
39 |
} |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
40 |
|
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
41 |
@Test |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
42 |
void test() { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
43 |
javadoc("-d", "out", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
44 |
"-sourcepath", testSrc, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
45 |
"-Xdoclint:none", |
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); |
17545 | 48 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
49 |
checkOutput("pkg/Test.html", true, |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
50 |
"no_pre​()</pre>\n" |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
51 |
+ "<div class=\"block\">abc<code>def</code>ghi</div>", |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
52 |
"no_pre_extra_whitespace​()</pre>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
53 |
+ "<div class=\"block\">abc<code> def </code>ghi</div>", |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
54 |
"in_pre​()</pre>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
55 |
+ "<div class=\"block\"><pre> abc<code> def </code>ghi</pre></div>", |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
56 |
"pre_after_text​()</pre>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
57 |
+ "<div class=\"block\">xyz <pre> abc<code> def </code>ghi</pre></div>", |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
58 |
"after_pre​()</pre>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
59 |
+ "<div class=\"block\">xyz <pre> pqr </pre> abc<code> def </code>ghi</div>", |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
60 |
"back_in_pre​()</pre>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
61 |
+ "<div class=\"block\">xyz <pre> pqr </pre> mno <pre> abc<code> def </code>ghi</pre></div>", |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
62 |
"typical_usage_code​()</pre>\n" |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
63 |
+ "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
64 |
+ " Example: <pre><code>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
65 |
+ " line 0 @Override\n" |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
66 |
+ " line 1 <T> void m(T t) {\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
67 |
+ " line 2 // do something with T\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
68 |
+ " line 3 }\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
69 |
+ " </code></pre>\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
70 |
+ " and so it goes.</div>", |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
71 |
"typical_usage_literal​()</pre>\n" |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
72 |
+ "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
73 |
+ " Example: <pre>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
74 |
+ " line 0 @Override\n" |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
75 |
+ " line 1 <T> void m(T t) {\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
76 |
+ " line 2 // do something with T\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
77 |
+ " line 3 }\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
78 |
+ " </pre>\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
79 |
+ " and so it goes.</div>", |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
80 |
"recommended_usage_literal​()</pre>\n" |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
81 |
+ "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
82 |
+ " Example: <pre>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
83 |
+ " line 0 @Override\n" |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
84 |
+ " line 1 <T> void m(T t) {\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
85 |
+ " line 2 // do something with T\n" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
86 |
+ " line 3 } </pre>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
87 |
+ " and so it goes.</div>", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
88 |
"<div class=\"block\">Test for html in pre, note the spaces\n" |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
89 |
+ " <PRE>\n" |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
90 |
+ " <b>id </b>\n" |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
91 |
+ " </PRE></div>", |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
36526
diff
changeset
|
92 |
"<pre>public void htmlAttrInPre1​()</pre>\n" |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
93 |
+ "<div class=\"block\">More html tag outliers.\n" |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
94 |
+ " <pre>\n" |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
95 |
+ " @Override\n" |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
96 |
+ " <code> some.function() </code>\n" |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
30730
diff
changeset
|
97 |
+ " </pre></div>"); |
17545 | 98 |
} |
99 |
} |