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 AttrTest.java |
aoqi@0 | 30 | */ |
aoqi@0 | 31 | |
aoqi@0 | 32 | class AttrTest { |
aoqi@0 | 33 | /** |
aoqi@0 | 34 | * <a name=unquoted>foo</a> |
aoqi@0 | 35 | */ |
aoqi@0 | 36 | void unquoted_attr() { } |
aoqi@0 | 37 | /* |
aoqi@0 | 38 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 39 | firstSentence: 3 |
aoqi@0 | 40 | StartElement[START_ELEMENT, pos:1 |
aoqi@0 | 41 | name:a |
aoqi@0 | 42 | attributes: 1 |
aoqi@0 | 43 | Attribute[ATTRIBUTE, pos:4 |
aoqi@0 | 44 | name: name |
aoqi@0 | 45 | vkind: UNQUOTED |
aoqi@0 | 46 | value: 1 |
aoqi@0 | 47 | Text[TEXT, pos:9, unquoted] |
aoqi@0 | 48 | ] |
aoqi@0 | 49 | ] |
aoqi@0 | 50 | Text[TEXT, pos:18, foo] |
aoqi@0 | 51 | EndElement[END_ELEMENT, pos:21, a] |
aoqi@0 | 52 | body: empty |
aoqi@0 | 53 | block tags: empty |
aoqi@0 | 54 | ] |
aoqi@0 | 55 | */ |
aoqi@0 | 56 | |
aoqi@0 | 57 | /** |
aoqi@0 | 58 | * <a name="double_quoted">foo</a> |
aoqi@0 | 59 | */ |
aoqi@0 | 60 | void double_quoted_attr() { } |
aoqi@0 | 61 | /* |
aoqi@0 | 62 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 63 | firstSentence: 3 |
aoqi@0 | 64 | StartElement[START_ELEMENT, pos:1 |
aoqi@0 | 65 | name:a |
aoqi@0 | 66 | attributes: 1 |
aoqi@0 | 67 | Attribute[ATTRIBUTE, pos:4 |
aoqi@0 | 68 | name: name |
aoqi@0 | 69 | vkind: DOUBLE |
aoqi@0 | 70 | value: 1 |
aoqi@0 | 71 | Text[TEXT, pos:10, double_quoted] |
aoqi@0 | 72 | ] |
aoqi@0 | 73 | ] |
aoqi@0 | 74 | Text[TEXT, pos:25, foo] |
aoqi@0 | 75 | EndElement[END_ELEMENT, pos:28, a] |
aoqi@0 | 76 | body: empty |
aoqi@0 | 77 | block tags: empty |
aoqi@0 | 78 | ] |
aoqi@0 | 79 | */ |
aoqi@0 | 80 | |
aoqi@0 | 81 | /** |
aoqi@0 | 82 | * <a name='single_quoted'>foo</a> |
aoqi@0 | 83 | */ |
aoqi@0 | 84 | void single_quoted_attr() { } |
aoqi@0 | 85 | /* |
aoqi@0 | 86 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 87 | firstSentence: 3 |
aoqi@0 | 88 | StartElement[START_ELEMENT, pos:1 |
aoqi@0 | 89 | name:a |
aoqi@0 | 90 | attributes: 1 |
aoqi@0 | 91 | Attribute[ATTRIBUTE, pos:4 |
aoqi@0 | 92 | name: name |
aoqi@0 | 93 | vkind: SINGLE |
aoqi@0 | 94 | value: 1 |
aoqi@0 | 95 | Text[TEXT, pos:10, single_quoted] |
aoqi@0 | 96 | ] |
aoqi@0 | 97 | ] |
aoqi@0 | 98 | Text[TEXT, pos:25, foo] |
aoqi@0 | 99 | EndElement[END_ELEMENT, pos:28, a] |
aoqi@0 | 100 | body: empty |
aoqi@0 | 101 | block tags: empty |
aoqi@0 | 102 | ] |
aoqi@0 | 103 | */ |
aoqi@0 | 104 | |
aoqi@0 | 105 | /** |
aoqi@0 | 106 | * <hr size="3"> |
aoqi@0 | 107 | */ |
aoqi@0 | 108 | void numeric_attr() { } |
aoqi@0 | 109 | /* |
aoqi@0 | 110 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 111 | firstSentence: 1 |
aoqi@0 | 112 | StartElement[START_ELEMENT, pos:1 |
aoqi@0 | 113 | name:hr |
aoqi@0 | 114 | attributes: 1 |
aoqi@0 | 115 | Attribute[ATTRIBUTE, pos:5 |
aoqi@0 | 116 | name: size |
aoqi@0 | 117 | vkind: DOUBLE |
aoqi@0 | 118 | value: 1 |
aoqi@0 | 119 | Text[TEXT, pos:11, 3] |
aoqi@0 | 120 | ] |
aoqi@0 | 121 | ] |
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 | * <a href="{@docRoot}/index.html"> |
aoqi@0 | 129 | */ |
aoqi@0 | 130 | void docRoot_attr() { } |
aoqi@0 | 131 | /* |
aoqi@0 | 132 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 133 | firstSentence: 1 |
aoqi@0 | 134 | StartElement[START_ELEMENT, pos:1 |
aoqi@0 | 135 | name:a |
aoqi@0 | 136 | attributes: 1 |
aoqi@0 | 137 | Attribute[ATTRIBUTE, pos:4 |
aoqi@0 | 138 | name: href |
aoqi@0 | 139 | vkind: DOUBLE |
aoqi@0 | 140 | value: 2 |
aoqi@0 | 141 | DocRoot[DOC_ROOT, pos:10] |
aoqi@0 | 142 | Text[TEXT, pos:20, /index.html] |
aoqi@0 | 143 | ] |
aoqi@0 | 144 | ] |
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 | * <a name="abc"def"> |
aoqi@0 | 152 | */ |
aoqi@0 | 153 | void entity_attr() { } |
aoqi@0 | 154 | /* |
aoqi@0 | 155 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 156 | firstSentence: 1 |
aoqi@0 | 157 | StartElement[START_ELEMENT, pos:1 |
aoqi@0 | 158 | name:a |
aoqi@0 | 159 | attributes: 1 |
aoqi@0 | 160 | Attribute[ATTRIBUTE, pos:4 |
aoqi@0 | 161 | name: name |
aoqi@0 | 162 | vkind: DOUBLE |
aoqi@0 | 163 | value: 3 |
aoqi@0 | 164 | Text[TEXT, pos:10, abc] |
aoqi@0 | 165 | Entity[ENTITY, pos:13, quot] |
aoqi@0 | 166 | Text[TEXT, pos:19, def] |
aoqi@0 | 167 | ] |
aoqi@0 | 168 | ] |
aoqi@0 | 169 | body: empty |
aoqi@0 | 170 | block tags: empty |
aoqi@0 | 171 | ] |
aoqi@0 | 172 | */ |
aoqi@0 | 173 | |
aoqi@0 | 174 | /** |
aoqi@0 | 175 | * <hr noshade> |
aoqi@0 | 176 | */ |
aoqi@0 | 177 | void no_value_attr() { } |
aoqi@0 | 178 | /* |
aoqi@0 | 179 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 180 | firstSentence: 1 |
aoqi@0 | 181 | StartElement[START_ELEMENT, pos:1 |
aoqi@0 | 182 | name:hr |
aoqi@0 | 183 | attributes: 1 |
aoqi@0 | 184 | Attribute[ATTRIBUTE, pos:5 |
aoqi@0 | 185 | name: noshade |
aoqi@0 | 186 | vkind: EMPTY |
aoqi@0 | 187 | value: null |
aoqi@0 | 188 | ] |
aoqi@0 | 189 | ] |
aoqi@0 | 190 | body: empty |
aoqi@0 | 191 | block tags: empty |
aoqi@0 | 192 | ] |
aoqi@0 | 193 | */ |
aoqi@0 | 194 | |
aoqi@0 | 195 | /** |
aoqi@0 | 196 | * abc <hr size='3'/> |
aoqi@0 | 197 | */ |
aoqi@0 | 198 | void self_closing_attr_1() { } |
aoqi@0 | 199 | /* |
aoqi@0 | 200 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 201 | firstSentence: 2 |
aoqi@0 | 202 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 203 | StartElement[START_ELEMENT, pos:5 |
aoqi@0 | 204 | name:hr |
aoqi@0 | 205 | attributes: 1 |
aoqi@0 | 206 | Attribute[ATTRIBUTE, pos:9 |
aoqi@0 | 207 | name: size |
aoqi@0 | 208 | vkind: SINGLE |
aoqi@0 | 209 | value: 1 |
aoqi@0 | 210 | Text[TEXT, pos:15, 3] |
aoqi@0 | 211 | ] |
aoqi@0 | 212 | ] |
aoqi@0 | 213 | body: empty |
aoqi@0 | 214 | block tags: empty |
aoqi@0 | 215 | ] |
aoqi@0 | 216 | */ |
aoqi@0 | 217 | |
aoqi@0 | 218 | /** |
aoqi@0 | 219 | * abc <hr size=3 /> |
aoqi@0 | 220 | */ |
aoqi@0 | 221 | void self_closing_attr_2() { } |
aoqi@0 | 222 | /* |
aoqi@0 | 223 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 224 | firstSentence: 2 |
aoqi@0 | 225 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 226 | StartElement[START_ELEMENT, pos:5 |
aoqi@0 | 227 | name:hr |
aoqi@0 | 228 | attributes: 1 |
aoqi@0 | 229 | Attribute[ATTRIBUTE, pos:9 |
aoqi@0 | 230 | name: size |
aoqi@0 | 231 | vkind: UNQUOTED |
aoqi@0 | 232 | value: 1 |
aoqi@0 | 233 | Text[TEXT, pos:14, 3] |
aoqi@0 | 234 | ] |
aoqi@0 | 235 | ] |
aoqi@0 | 236 | body: empty |
aoqi@0 | 237 | block tags: empty |
aoqi@0 | 238 | ] |
aoqi@0 | 239 | */ |
aoqi@0 | 240 | |
aoqi@0 | 241 | /** |
aoqi@0 | 242 | * abc <hr size="3 |
aoqi@0 | 243 | */ |
aoqi@0 | 244 | void unterminated_attr_eoi() { } |
aoqi@0 | 245 | /* |
aoqi@0 | 246 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 247 | firstSentence: 3 |
aoqi@0 | 248 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 249 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 250 | code: compiler.err.dc.malformed.html |
aoqi@0 | 251 | body: < |
aoqi@0 | 252 | ] |
aoqi@0 | 253 | Text[TEXT, pos:6, hr_size="3] |
aoqi@0 | 254 | body: empty |
aoqi@0 | 255 | block tags: empty |
aoqi@0 | 256 | ] |
aoqi@0 | 257 | */ |
aoqi@0 | 258 | |
aoqi@0 | 259 | /** |
aoqi@0 | 260 | * abc <hr size="3 |
aoqi@0 | 261 | * @author jjg |
aoqi@0 | 262 | */ |
aoqi@0 | 263 | void unterminated_attr_block() { } |
aoqi@0 | 264 | /* |
aoqi@0 | 265 | DocComment[DOC_COMMENT, pos:1 |
aoqi@0 | 266 | firstSentence: 3 |
aoqi@0 | 267 | Text[TEXT, pos:1, abc_] |
aoqi@0 | 268 | Erroneous[ERRONEOUS, pos:5 |
aoqi@0 | 269 | code: compiler.err.dc.malformed.html |
aoqi@0 | 270 | body: < |
aoqi@0 | 271 | ] |
aoqi@0 | 272 | Text[TEXT, pos:6, hr_size="3] |
aoqi@0 | 273 | body: empty |
aoqi@0 | 274 | block tags: 1 |
aoqi@0 | 275 | Author[AUTHOR, pos:18 |
aoqi@0 | 276 | name: 1 |
aoqi@0 | 277 | Text[TEXT, pos:26, jjg] |
aoqi@0 | 278 | ] |
aoqi@0 | 279 | ] |
aoqi@0 | 280 | */ |
aoqi@0 | 281 | } |