test/tools/javac/doctree/SeeTest.java

Mon, 01 Jun 2015 15:19:54 -0700

author
darcy
date
Mon, 01 Jun 2015 15:19:54 -0700
changeset 3834
45746e46893b
parent 2268
b4e592c5314d
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8075546: Add tiered testing definitions to the langtools repo
Reviewed-by: jjg

jjg@1409 1 /*
jjg@2268 2 * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
jjg@1409 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jjg@1409 4 *
jjg@1409 5 * This code is free software; you can redistribute it and/or modify it
jjg@1409 6 * under the terms of the GNU General Public License version 2 only, as
jjg@1409 7 * published by the Free Software Foundation.
jjg@1409 8 *
jjg@1409 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jjg@1409 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jjg@1409 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jjg@1409 12 * version 2 for more details (a copy is included in the LICENSE file that
jjg@1409 13 * accompanied this code).
jjg@1409 14 *
jjg@1409 15 * You should have received a copy of the GNU General Public License version
jjg@1409 16 * 2 along with this work; if not, write to the Free Software Foundation,
jjg@1409 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jjg@1409 18 *
jjg@1409 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jjg@1409 20 * or visit www.oracle.com if you need additional information or have any
jjg@1409 21 * questions.
jjg@1409 22 */
jjg@1409 23
jjg@1409 24 /*
jjg@1409 25 * @test
jjg@2268 26 * @bug 7021614 8031212
jjg@1409 27 * @summary extend com.sun.source API to support parsing javadoc comments
jjg@1409 28 * @build DocCommentTester
jjg@1409 29 * @run main DocCommentTester SeeTest.java
jjg@1409 30 */
jjg@1409 31
jjg@1409 32 class SeeTest {
jjg@1409 33 /**
jjg@1409 34 * abc.
jjg@1409 35 * @see "String"
jjg@1409 36 */
jjg@1409 37 void quoted_text() { }
jjg@1409 38 /*
jjg@1409 39 DocComment[DOC_COMMENT, pos:1
jjg@1409 40 firstSentence: 1
jjg@1409 41 Text[TEXT, pos:1, abc.]
jjg@1409 42 body: empty
jjg@1409 43 block tags: 1
jjg@2268 44 See[SEE, pos:7
jjg@2268 45 reference: 1
jjg@2268 46 Text[TEXT, pos:12, "String"]
jjg@1409 47 ]
jjg@1409 48 ]
jjg@1409 49 */
jjg@1409 50
jjg@1409 51 /**
jjg@1409 52 * abc.
jjg@1409 53 * @see <a href="url">url</a>
jjg@1409 54 */
jjg@1409 55 void url() { }
jjg@1409 56 /*
jjg@1409 57 DocComment[DOC_COMMENT, pos:1
jjg@1409 58 firstSentence: 1
jjg@1409 59 Text[TEXT, pos:1, abc.]
jjg@1409 60 body: empty
jjg@1409 61 block tags: 1
jjg@1409 62 See[SEE, pos:7
jjg@1409 63 reference: 3
jjg@1409 64 StartElement[START_ELEMENT, pos:12
jjg@1409 65 name:a
jjg@1409 66 attributes: 1
jjg@1409 67 Attribute[ATTRIBUTE, pos:15
jjg@1409 68 name: href
jjg@1409 69 vkind: DOUBLE
jjg@1409 70 value: 1
jjg@1409 71 Text[TEXT, pos:21, url]
jjg@1409 72 ]
jjg@1409 73 ]
jjg@1409 74 Text[TEXT, pos:26, url]
jjg@1409 75 EndElement[END_ELEMENT, pos:29, a]
jjg@1409 76 ]
jjg@1409 77 ]
jjg@1409 78 */
jjg@1409 79
jjg@1409 80 /**
jjg@1409 81 * abc.
jjg@1409 82 * @see String text
jjg@1409 83 */
jjg@1409 84 void string() { }
jjg@1409 85 /*
jjg@1409 86 DocComment[DOC_COMMENT, pos:1
jjg@1409 87 firstSentence: 1
jjg@1409 88 Text[TEXT, pos:1, abc.]
jjg@1409 89 body: empty
jjg@1409 90 block tags: 1
jjg@1409 91 See[SEE, pos:7
jjg@1409 92 reference: 2
jjg@1409 93 Reference[REFERENCE, pos:12, String]
jjg@1409 94 Text[TEXT, pos:19, text]
jjg@1409 95 ]
jjg@1409 96 ]
jjg@1409 97 */
jjg@1409 98
jjg@1409 99 /**
jjg@1409 100 * abc.
jjg@1409 101 * @see java.lang.String text
jjg@1409 102 */
jjg@1409 103 void j_l_string() { }
jjg@1409 104 /*
jjg@1409 105 DocComment[DOC_COMMENT, pos:1
jjg@1409 106 firstSentence: 1
jjg@1409 107 Text[TEXT, pos:1, abc.]
jjg@1409 108 body: empty
jjg@1409 109 block tags: 1
jjg@1409 110 See[SEE, pos:7
jjg@1409 111 reference: 2
jjg@1409 112 Reference[REFERENCE, pos:12, java.lang.String]
jjg@1409 113 Text[TEXT, pos:29, text]
jjg@1409 114 ]
jjg@1409 115 ]
jjg@1409 116 */
jjg@1409 117
jjg@1409 118 /**
jjg@1409 119 * abc.
jjg@1409 120 * @see java.lang.String#length text
jjg@1409 121 */
jjg@1409 122 void j_l_string_length() { }
jjg@1409 123 /*
jjg@1409 124 DocComment[DOC_COMMENT, pos:1
jjg@1409 125 firstSentence: 1
jjg@1409 126 Text[TEXT, pos:1, abc.]
jjg@1409 127 body: empty
jjg@1409 128 block tags: 1
jjg@1409 129 See[SEE, pos:7
jjg@1409 130 reference: 2
jjg@1409 131 Reference[REFERENCE, pos:12, java.lang.String#length]
jjg@1409 132 Text[TEXT, pos:36, text]
jjg@1409 133 ]
jjg@1409 134 ]
jjg@1409 135 */
jjg@1409 136
jjg@1409 137 /**
jjg@1409 138 * abc.
jjg@1409 139 * @see java.lang.String#matches(String regex) text
jjg@1409 140 */
jjg@1409 141 void j_l_string_matches() { }
jjg@1409 142 /*
jjg@1409 143 DocComment[DOC_COMMENT, pos:1
jjg@1409 144 firstSentence: 1
jjg@1409 145 Text[TEXT, pos:1, abc.]
jjg@1409 146 body: empty
jjg@1409 147 block tags: 1
jjg@1409 148 See[SEE, pos:7
jjg@1409 149 reference: 2
jjg@1409 150 Reference[REFERENCE, pos:12, java.lang.String...#matches(String_regex)]
jjg@1409 151 Text[TEXT, pos:51, text]
jjg@1409 152 ]
jjg@1409 153 ]
jjg@1409 154 */
jjg@1409 155
jjg@1409 156 /**
jjg@1409 157 * abc.
jjg@1409 158 * @see 123 text
jjg@1409 159 */
jjg@1409 160 void bad_numeric() { }
jjg@1409 161 /*
jjg@1409 162 DocComment[DOC_COMMENT, pos:1
jjg@1409 163 firstSentence: 1
jjg@1409 164 Text[TEXT, pos:1, abc.]
jjg@1409 165 body: empty
jjg@1409 166 block tags: 1
jjg@1409 167 Erroneous[ERRONEOUS, pos:7
jjg@1409 168 code: compiler.err.dc.unexpected.content
jjg@1409 169 body: @see_123_text
jjg@1409 170 ]
jjg@1409 171 ]
jjg@1409 172 */
jjg@1409 173
jjg@1409 174 }

mercurial