author | dlong |
Thu, 31 Oct 2019 16:54:16 -0700 | |
changeset 58877 | aec7bf35d6f5 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
14952 | 1 |
/* |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
25452
diff
changeset
|
2 |
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. |
14952 | 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 |
|
25452 | 26 |
* @bug 8004832 8048806 |
14962 | 27 |
* @summary Add new doclint package |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
25452
diff
changeset
|
28 |
* @modules jdk.compiler/com.sun.tools.doclint |
14952 | 29 |
* @build DocLintTester |
30 |
* @run main DocLintTester ValidTest.java |
|
31 |
*/ |
|
32 |
||
33 |
class ValidTest { |
|
34 |
/** |
|
35 |
* < > & ( |
|
36 |
*/ |
|
37 |
void entities() { } |
|
38 |
||
39 |
/** |
|
25452 | 40 |
* <abbr>abbreviation<abbr> |
41 |
* <acronym>ABC</acronym> |
|
42 |
* <cite>citation</cite> |
|
43 |
* <code>code</code> |
|
44 |
* <dfn>defining instance</dfn> |
|
45 |
* <em>emphasis</em> |
|
46 |
* <kbd>keyboard<kbd> |
|
47 |
* <samp>sample</samp> |
|
48 |
* <var>variable</var> |
|
49 |
* <strong>strong</strong> |
|
50 |
*/ |
|
51 |
void phraseElements() { } |
|
52 |
||
53 |
/** |
|
54 |
* <address>1 Main St., USA</address> |
|
55 |
*/ |
|
56 |
void address() { } |
|
57 |
||
58 |
/** |
|
59 |
* <del>deleted</del> |
|
60 |
* <ins>inserted</del> |
|
61 |
*/ |
|
62 |
void docChanges() {} |
|
63 |
||
64 |
/** |
|
65 |
* <blockquote> |
|
66 |
* A fine thing. |
|
67 |
* </blockquote> |
|
68 |
* <q>A fine thing.</q> |
|
69 |
*/ |
|
70 |
||
71 |
/** |
|
14952 | 72 |
* <h1> ... </h1> |
73 |
* <h2> ... </h2> |
|
74 |
* <h3> ... </h3> |
|
75 |
* <h4> ... </h4> |
|
76 |
* <h5> ... </h5> |
|
77 |
* <h6> ... </h6> |
|
78 |
*/ |
|
79 |
void all_headers() { } |
|
80 |
||
81 |
/** |
|
82 |
* <h1> ... </h1> |
|
83 |
* <h2> ... </h2> |
|
84 |
* <h3> ... </h3> |
|
85 |
* <h1> ... </h1> |
|
86 |
* <h2> ... </h2> |
|
87 |
* <h3> ... </h3> |
|
88 |
* <h2> ... </h2> |
|
89 |
*/ |
|
90 |
void header_series() { } |
|
91 |
||
92 |
/** |
|
93 |
* <div> <p> </div> |
|
94 |
*/ |
|
95 |
void autoclose_tags() { } |
|
96 |
||
97 |
/** |
|
98 |
* @param x |
|
99 |
*/ |
|
100 |
void method_param(int x) { } |
|
101 |
||
102 |
/** |
|
103 |
* @param <T> |
|
104 |
*/ |
|
105 |
<T> T method_typaram(T t) { return t; } |
|
106 |
||
107 |
/** |
|
108 |
* @param <T> |
|
109 |
*/ |
|
110 |
class ClassTyparam<T> { } |
|
111 |
||
112 |
/** |
|
113 |
* @param <T> |
|
114 |
*/ |
|
115 |
interface InterfaceTyparam<T> { } |
|
116 |
||
117 |
/** |
|
118 |
* @return x |
|
119 |
*/ |
|
120 |
int return_int() { return 0; } |
|
121 |
||
122 |
/** |
|
123 |
* @exception Exception |
|
124 |
*/ |
|
125 |
void throws_Exception1() throws Exception { } |
|
126 |
||
127 |
/** |
|
128 |
* @throws Exception |
|
129 |
*/ |
|
130 |
void throws_Exception2() throws Exception { } |
|
131 |
||
132 |
class X { |
|
133 |
/** |
|
134 |
* @param x |
|
135 |
*/ |
|
136 |
X(int x) { } // constructor parameter |
|
137 |
||
138 |
/** |
|
139 |
* @param <T> |
|
140 |
*/ |
|
141 |
<T> X(T t) { } // constructor type parameter |
|
142 |
} |
|
143 |
||
144 |
} |
|
145 |