author | chegar |
Thu, 17 Oct 2019 20:54:25 +0100 | |
branch | datagramsocketimpl-branch |
changeset 58679 | 9c3209ff7550 |
parent 58678 | 9cf78a70fa4f |
parent 55339 | 0530705ca300 |
permissions | -rw-r--r-- |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
1 |
/* |
53562 | 2 |
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
4 |
* |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
52377 | 7 |
* published by the Free Software Foundation. |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
8 |
* |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
13 |
* accompanied this code). |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
14 |
* |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
18 |
* |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
21 |
* questions. |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
22 |
*/ |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
23 |
|
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
24 |
/* |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
25 |
* @test |
50293
edfb87b2520e
8196202: Javadoc should not generate frames by default
jjg
parents:
49139
diff
changeset
|
26 |
* @bug 8173425 8186332 8182765 8196202 |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
27 |
* @summary tests for the summary tag behavior |
53097 | 28 |
* @library ../../lib |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
29 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
53097 | 30 |
* @build javadoc.tester.* |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
31 |
* @run main TestSummaryTag |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
32 |
*/ |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
33 |
|
53097 | 34 |
import javadoc.tester.JavadocTester; |
35 |
||
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
36 |
public class TestSummaryTag extends JavadocTester { |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
37 |
|
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
38 |
public static void main(String... args) throws Exception { |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
39 |
TestSummaryTag tester = new TestSummaryTag(); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
40 |
tester.runTests(); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
41 |
} |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
42 |
|
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
43 |
@Test |
53097 | 44 |
public void test1() { |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
45 |
javadoc("-d", "out1", |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
46 |
"-sourcepath", testSrc, |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
47 |
"p1"); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
48 |
checkExit(Exit.OK); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
49 |
|
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
50 |
checkOutput("index-all.html", true, |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
51 |
"<dl>\n" |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
52 |
+ "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m()\">m()" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
53 |
+ "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
54 |
+ "<dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
55 |
+ "<div class=\"block\">First sentence</div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
56 |
+ "</dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
57 |
+ "<dt><span class=\"memberNameLink\"><a href=\"p1/B.html#m()\">m()" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
58 |
+ "</a></span> - Method in class p1.<a href=\"p1/B.html\" title=\"class in p1\">B</a></dt>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
59 |
+ "<dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
60 |
+ "<div class=\"block\">First sentence</div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
61 |
+ "</dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
62 |
+ "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m1()\">m1()" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
63 |
+ "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
64 |
+ "<dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
65 |
+ "<div class=\"block\"> First sentence </div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
66 |
+ "</dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
67 |
+ "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m2()\">m2()" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
68 |
+ "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
69 |
+ "<dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
70 |
+ "<div class=\"block\">Some html <foo> codes</div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
71 |
+ "</dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
72 |
+ "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m3()\">m3()" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
73 |
+ "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
74 |
+ "<dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
75 |
+ "<div class=\"block\">First sentence </div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
76 |
+ "</dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
77 |
+ "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m4()\">m4()" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
78 |
+ "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
79 |
+ "<dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
80 |
+ "<div class=\"block\">First sentence i.e. the first sentence</div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
81 |
+ "</dd>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
82 |
+ "</dl>\n", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
83 |
"<div class=\"block\">The first... line</div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
84 |
); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
85 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
86 |
// make sure the second @summary's content is displayed correctly |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
87 |
checkOutput("p1/A.html", true, |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
88 |
"<section class=\"detail\">\n" |
55339
0530705ca300
8223364: Bad placement of anchor relative to header
hannesw
parents:
55197
diff
changeset
|
89 |
+ "<h3><a id=\"m3()\">m3</a></h3>\n" |
55197
0ca8e495bbba
8214126: Method signatures not formatted correctly in browser
hannesw
parents:
54596
diff
changeset
|
90 |
+ "<div class=\"memberSignature\"><span class=\"modifiers\">public</span> " |
0ca8e495bbba
8214126: Method signatures not formatted correctly in browser
hannesw
parents:
54596
diff
changeset
|
91 |
+ "<span class=\"returnType\">void</span> <span class=\"memberName\">m3</span>()</div>\n" |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
92 |
+ "<div class=\"block\">First sentence some text maybe second sentence.</div>\n" |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
93 |
+ "</section>\n" |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
94 |
); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
95 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
96 |
checkOutput("p1/package-summary.html", true, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
97 |
"<div class=\"block\">The first... line second from ...</div>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
98 |
} |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
99 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48028
diff
changeset
|
100 |
@Test |
53097 | 101 |
public void test2() { |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
102 |
javadoc("-d", "out2", |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
103 |
"-sourcepath", testSrc, |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
104 |
"p2"); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
105 |
checkExit(Exit.OK); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
106 |
|
48028
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47284
diff
changeset
|
107 |
checkOutput(Output.OUT, true, "package.html:3: warning: invalid use of @summary"); |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
108 |
|
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
109 |
checkOutput("index-all.html", true, "<div class=\"block\">foo bar</div>\n"); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
110 |
|
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
111 |
checkOutput("p2/package-summary.html", true, "<div class=\"block\">foo bar baz.</div>\n"); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
112 |
} |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
113 |
|
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
114 |
@Test |
53097 | 115 |
public void test3() { |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
116 |
javadoc("-d", "out3", |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
117 |
"-sourcepath", testSrc, |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
118 |
"-overview", testSrc("p3/overview.html"), |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
119 |
"p3"); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
120 |
checkExit(Exit.OK); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
121 |
|
54350
4f9772f4403d
8215599: Remove support for javadoc "frames" mode
pmuthuswamy
parents:
53991
diff
changeset
|
122 |
checkOutput("index.html", true, |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
123 |
"<div class=\"block\">The first... line second from ...</div>"); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
124 |
} |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
diff
changeset
|
125 |
} |