Thu, 10 Oct 2013 14:58:04 +0200
8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
1 /*
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
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 */
24 /*
25 * @test
26 * @bug 7021614
27 * @summary extend com.sun.source API to support parsing javadoc comments
28 * @build DocCommentTester
29 * @run main DocCommentTester EntityTest.java
30 */
32 class EntityTest {
33 /**
34 * abc < def
35 */
36 public void name() { }
37 /*
38 DocComment[DOC_COMMENT, pos:2
39 firstSentence: 3
40 Text[TEXT, pos:2, abc_]
41 Entity[ENTITY, pos:6, lt]
42 Text[TEXT, pos:10, _def]
43 body: empty
44 block tags: empty
45 ]
46 */
48 /**
49 * abc   def
50 */
51 public void decimal_value() { }
52 /*
53 DocComment[DOC_COMMENT, pos:2
54 firstSentence: 3
55 Text[TEXT, pos:2, abc_]
56 Entity[ENTITY, pos:6, #160]
57 Text[TEXT, pos:12, _def]
58 body: empty
59 block tags: empty
60 ]
61 */
63 /**
64 * abc   def
65 */
66 public void lower_hex_value() { }
67 /*
68 DocComment[DOC_COMMENT, pos:2
69 firstSentence: 3
70 Text[TEXT, pos:2, abc_]
71 Entity[ENTITY, pos:6, #xa0]
72 Text[TEXT, pos:12, _def]
73 body: empty
74 block tags: empty
75 ]
76 */
78 /**
79 * abc   def
80 */
81 public void upper_hex_value() { }
82 /*
83 DocComment[DOC_COMMENT, pos:2
84 firstSentence: 3
85 Text[TEXT, pos:2, abc_]
86 Entity[ENTITY, pos:6, #XA0]
87 Text[TEXT, pos:12, _def]
88 body: empty
89 block tags: empty
90 ]
91 */
93 /**
94 * abc & def
95 */
96 public void bad_amp() { }
97 /*
98 DocComment[DOC_COMMENT, pos:2
99 firstSentence: 3
100 Text[TEXT, pos:2, abc_]
101 Erroneous[ERRONEOUS, pos:6
102 code: compiler.err.dc.bad.entity
103 body: &
104 ]
105 Text[TEXT, pos:7, _def]
106 body: empty
107 block tags: empty
108 ]
109 */
111 /**
112 * abc &1 def
113 */
114 public void bad_entity_name() { }
115 /*
116 DocComment[DOC_COMMENT, pos:2
117 firstSentence: 3
118 Text[TEXT, pos:2, abc_]
119 Erroneous[ERRONEOUS, pos:6
120 code: compiler.err.dc.bad.entity
121 body: &
122 ]
123 Text[TEXT, pos:7, 1_def]
124 body: empty
125 block tags: empty
126 ]
127 */
129 /**
130 * abc .3; def
131 */
132 public void bad_entity_decimal_value() { }
133 /*
134 DocComment[DOC_COMMENT, pos:2
135 firstSentence: 3
136 Text[TEXT, pos:2, abc_]
137 Erroneous[ERRONEOUS, pos:6
138 code: compiler.err.dc.missing.semicolon
139 body: 
140 ]
141 Text[TEXT, pos:11, .3;_def]
142 body: empty
143 block tags: empty
144 ]
145 */
147 /**
148 * abc Īzc; def
149 */
150 public void bad_entity_hex_value() { }
151 /*
152 DocComment[DOC_COMMENT, pos:2
153 firstSentence: 3
154 Text[TEXT, pos:2, abc_]
155 Erroneous[ERRONEOUS, pos:6
156 code: compiler.err.dc.missing.semicolon
157 body: Ī
158 ]
159 Text[TEXT, pos:13, zc;_def]
160 body: empty
161 block tags: empty
162 ]
163 */
165 }