Thu, 10 Oct 2013 14:58:04 +0200
8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
aoqi@0 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
aoqi@0 | 4 | * |
aoqi@0 | 5 | * This code is free software; you can redistribute it and/or modify it |
aoqi@0 | 6 | * under the terms of the GNU General Public License version 2 only, as |
aoqi@0 | 7 | * published by the Free Software Foundation. |
aoqi@0 | 8 | * |
aoqi@0 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
aoqi@0 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
aoqi@0 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
aoqi@0 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
aoqi@0 | 13 | * accompanied this code). |
aoqi@0 | 14 | * |
aoqi@0 | 15 | * You should have received a copy of the GNU General Public License version |
aoqi@0 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
aoqi@0 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
aoqi@0 | 18 | * |
aoqi@0 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
aoqi@0 | 20 | * or visit www.oracle.com if you need additional information or have any |
aoqi@0 | 21 | * questions. |
aoqi@0 | 22 | */ |
aoqi@0 | 23 | |
aoqi@0 | 24 | /* |
aoqi@0 | 25 | * @test |
aoqi@0 | 26 | * @bug 7021614 |
aoqi@0 | 27 | * @summary extend com.sun.source API to support parsing javadoc comments |
aoqi@0 | 28 | * @build DocCommentTester |
aoqi@0 | 29 | * @run main DocCommentTester ElementTest.java |
aoqi@0 | 30 | */ |
aoqi@0 | 31 | |
aoqi@0 | 32 | class ElementTest { |
aoqi@0 | 33 | /** |
aoqi@0 | 34 | * <p>para</p> |
aoqi@0 | 35 | */ |
aoqi@0 | 36 | void simple() { } |
aoqi@0 | 37 | /* |
aoqi@0 | 38 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 39 | firstSentence: empty |
aoqi@0 | 40 | body: 3 |
aoqi@0 | 41 | StartElement[START_ELEMENT, pos:1 |
aoqi@0 | 42 | name:p |
aoqi@0 | 43 | attributes: empty |
aoqi@0 | 44 | ] |
aoqi@0 | 45 | Text[TEXT, pos:4, para] |
aoqi@0 | 46 | EndElement[END_ELEMENT, pos:8, p] |
aoqi@0 | 47 | block tags: empty |
aoqi@0 | 48 | ] |
aoqi@0 | 49 | */ |
aoqi@0 | 50 | |
aoqi@0 | 51 | /** |
aoqi@0 | 52 | * abc <hr/> |
aoqi@0 | 53 | */ |
aoqi@0 | 54 | void self_closing() { } |
aoqi@0 | 55 | /* |
aoqi@0 | 56 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 57 | firstSentence: 2 |
aoqi@0 | 58 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 59 | StartElement[START_ELEMENT, pos:5 |
aoqi@0 | 60 | name:hr |
aoqi@0 | 61 | attributes: empty |
aoqi@0 | 62 | ] |
aoqi@0 | 63 | body: empty |
aoqi@0 | 64 | block tags: empty |
aoqi@0 | 65 | ] |
aoqi@0 | 66 | */ |
aoqi@0 | 67 | |
aoqi@0 | 68 | /** |
aoqi@0 | 69 | * abc < def |
aoqi@0 | 70 | */ |
aoqi@0 | 71 | void bad_lt() { } |
aoqi@0 | 72 | /* |
aoqi@0 | 73 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 74 | firstSentence: 3 |
aoqi@0 | 75 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 76 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 77 | code: compiler.err.dc.malformed.html |
aoqi@0 | 78 | body: < |
aoqi@0 | 79 | ] |
aoqi@0 | 80 | Text[TEXT, pos:6, _def] |
aoqi@0 | 81 | body: empty |
aoqi@0 | 82 | block tags: empty |
aoqi@0 | 83 | ] |
aoqi@0 | 84 | */ |
aoqi@0 | 85 | |
aoqi@0 | 86 | /** |
aoqi@0 | 87 | * abc > def |
aoqi@0 | 88 | */ |
aoqi@0 | 89 | void bad_gt() { } |
aoqi@0 | 90 | /* |
aoqi@0 | 91 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 92 | firstSentence: 3 |
aoqi@0 | 93 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 94 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 95 | code: compiler.err.dc.bad.gt |
aoqi@0 | 96 | body: > |
aoqi@0 | 97 | ] |
aoqi@0 | 98 | Text[TEXT, pos:6, _def] |
aoqi@0 | 99 | body: empty |
aoqi@0 | 100 | block tags: empty |
aoqi@0 | 101 | ] |
aoqi@0 | 102 | */ |
aoqi@0 | 103 | |
aoqi@0 | 104 | /** |
aoqi@0 | 105 | * abc <p 123> def |
aoqi@0 | 106 | */ |
aoqi@0 | 107 | void bad_chars_start(); |
aoqi@0 | 108 | /* |
aoqi@0 | 109 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 110 | firstSentence: 5 |
aoqi@0 | 111 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 112 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 113 | code: compiler.err.dc.malformed.html |
aoqi@0 | 114 | body: < |
aoqi@0 | 115 | ] |
aoqi@0 | 116 | Text[TEXT, pos:6, p_123] |
aoqi@0 | 117 | Erroneous[ERRONEOUS, pos:11 |
aoqi@0 | 118 | code: compiler.err.dc.bad.gt |
aoqi@0 | 119 | body: > |
aoqi@0 | 120 | ] |
aoqi@0 | 121 | Text[TEXT, pos:12, _def] |
aoqi@0 | 122 | body: empty |
aoqi@0 | 123 | block tags: empty |
aoqi@0 | 124 | ] |
aoqi@0 | 125 | */ |
aoqi@0 | 126 | |
aoqi@0 | 127 | /** |
aoqi@0 | 128 | * abc </p 123> def |
aoqi@0 | 129 | */ |
aoqi@0 | 130 | void bad_chars_end(); |
aoqi@0 | 131 | /* |
aoqi@0 | 132 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 133 | firstSentence: 5 |
aoqi@0 | 134 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 135 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 136 | code: compiler.err.dc.malformed.html |
aoqi@0 | 137 | body: < |
aoqi@0 | 138 | ] |
aoqi@0 | 139 | Text[TEXT, pos:6, /p_123] |
aoqi@0 | 140 | Erroneous[ERRONEOUS, pos:12 |
aoqi@0 | 141 | code: compiler.err.dc.bad.gt |
aoqi@0 | 142 | body: > |
aoqi@0 | 143 | ] |
aoqi@0 | 144 | Text[TEXT, pos:13, _def] |
aoqi@0 | 145 | body: empty |
aoqi@0 | 146 | block tags: empty |
aoqi@0 | 147 | ] |
aoqi@0 | 148 | */ |
aoqi@0 | 149 | |
aoqi@0 | 150 | /** |
aoqi@0 | 151 | * abc <hr |
aoqi@0 | 152 | */ |
aoqi@0 | 153 | void unterminated_eoi() { } |
aoqi@0 | 154 | /* |
aoqi@0 | 155 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 156 | firstSentence: 3 |
aoqi@0 | 157 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 158 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 159 | code: compiler.err.dc.malformed.html |
aoqi@0 | 160 | body: < |
aoqi@0 | 161 | ] |
aoqi@0 | 162 | Text[TEXT, pos:6, hr] |
aoqi@0 | 163 | body: empty |
aoqi@0 | 164 | block tags: empty |
aoqi@0 | 165 | ] |
aoqi@0 | 166 | */ |
aoqi@0 | 167 | |
aoqi@0 | 168 | /** |
aoqi@0 | 169 | * abc <hr |
aoqi@0 | 170 | * @author jjg |
aoqi@0 | 171 | */ |
aoqi@0 | 172 | void unterminated_block() { } |
aoqi@0 | 173 | /* |
aoqi@0 | 174 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 175 | firstSentence: 3 |
aoqi@0 | 176 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 177 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 178 | code: compiler.err.dc.malformed.html |
aoqi@0 | 179 | body: < |
aoqi@0 | 180 | ] |
aoqi@0 | 181 | Text[TEXT, pos:6, hr] |
aoqi@0 | 182 | body: empty |
aoqi@0 | 183 | block tags: 1 |
aoqi@0 | 184 | Author[AUTHOR, pos:10 |
aoqi@0 | 185 | name: 1 |
aoqi@0 | 186 | Text[TEXT, pos:18, jjg] |
aoqi@0 | 187 | ] |
aoqi@0 | 188 | ] |
aoqi@0 | 189 | */ |
aoqi@0 | 190 | |
aoqi@0 | 191 | |
aoqi@0 | 192 | /** |
aoqi@0 | 193 | * abc </p |
aoqi@0 | 194 | */ |
aoqi@0 | 195 | void unterminated_end_eoi() { } |
aoqi@0 | 196 | /* |
aoqi@0 | 197 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 198 | firstSentence: 3 |
aoqi@0 | 199 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 200 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 201 | code: compiler.err.dc.malformed.html |
aoqi@0 | 202 | body: < |
aoqi@0 | 203 | ] |
aoqi@0 | 204 | Text[TEXT, pos:6, /p] |
aoqi@0 | 205 | body: empty |
aoqi@0 | 206 | block tags: empty |
aoqi@0 | 207 | ] |
aoqi@0 | 208 | */ |
aoqi@0 | 209 | |
aoqi@0 | 210 | /** |
aoqi@0 | 211 | * abc </p |
aoqi@0 | 212 | * @author jjg |
aoqi@0 | 213 | */ |
aoqi@0 | 214 | void unterminated_end_block() { } |
aoqi@0 | 215 | /* |
aoqi@0 | 216 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 217 | firstSentence: 3 |
aoqi@0 | 218 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 219 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 220 | code: compiler.err.dc.malformed.html |
aoqi@0 | 221 | body: < |
aoqi@0 | 222 | ] |
aoqi@0 | 223 | Text[TEXT, pos:6, /p] |
aoqi@0 | 224 | body: empty |
aoqi@0 | 225 | block tags: 1 |
aoqi@0 | 226 | Author[AUTHOR, pos:10 |
aoqi@0 | 227 | name: 1 |
aoqi@0 | 228 | Text[TEXT, pos:18, jjg] |
aoqi@0 | 229 | ] |
aoqi@0 | 230 | ] |
aoqi@0 | 231 | */ |
aoqi@0 | 232 | |
aoqi@0 | 233 | /** |
aoqi@0 | 234 | * abc |
aoqi@0 | 235 | * <!-- comment --> |
aoqi@0 | 236 | * def |
aoqi@0 | 237 | */ |
aoqi@0 | 238 | void comment() { } |
aoqi@0 | 239 | /* |
aoqi@0 | 240 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 241 | firstSentence: 3 |
aoqi@0 | 242 | Text[TEXT, pos:1, abc|_] |
aoqi@0 | 243 | Comment[COMMENT, pos:6, <!--_comment_-->] |
aoqi@0 | 244 | Text[TEXT, pos:22, |_def] |
aoqi@0 | 245 | body: empty |
aoqi@0 | 246 | block tags: empty |
aoqi@0 | 247 | ] |
aoqi@0 | 248 | */ |
aoqi@0 | 249 | |
aoqi@0 | 250 | } |