Wed, 18 Sep 2013 22:47:06 -0700
8024096: some javadoc tests may contain false positive results
Reviewed-by: jjg
bpatel@1686 | 1 | /* |
bpatel@1686 | 2 | * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
bpatel@1686 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
bpatel@1686 | 4 | * |
bpatel@1686 | 5 | * This code is free software; you can redistribute it and/or modify it |
bpatel@1686 | 6 | * under the terms of the GNU General Public License version 2 only, as |
bpatel@1686 | 7 | * published by the Free Software Foundation. |
bpatel@1686 | 8 | * |
bpatel@1686 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
bpatel@1686 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
bpatel@1686 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
bpatel@1686 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
bpatel@1686 | 13 | * accompanied this code). |
bpatel@1686 | 14 | * |
bpatel@1686 | 15 | * You should have received a copy of the GNU General Public License version |
bpatel@1686 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
bpatel@1686 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
bpatel@1686 | 18 | * |
bpatel@1686 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
bpatel@1686 | 20 | * or visit www.oracle.com if you need additional information or have any |
bpatel@1686 | 21 | * questions. |
bpatel@1686 | 22 | */ |
bpatel@1686 | 23 | |
bpatel@1686 | 24 | /* |
bpatel@1686 | 25 | * @test |
bpatel@1691 | 26 | * @bug 8005091 8009686 |
bpatel@1686 | 27 | * @summary Make sure that type annotations are displayed correctly |
bpatel@1686 | 28 | * @author Bhavesh Patel |
bpatel@1686 | 29 | * @library ../lib/ |
bpatel@1686 | 30 | * @build JavadocTester TestTypeAnnotations |
bpatel@1686 | 31 | * @run main TestTypeAnnotations |
bpatel@1686 | 32 | */ |
bpatel@1686 | 33 | |
bpatel@1686 | 34 | public class TestTypeAnnotations extends JavadocTester { |
bpatel@1686 | 35 | |
bpatel@1686 | 36 | //Test information. |
bpatel@1691 | 37 | private static final String BUG_ID = "8005091-8009686"; |
bpatel@1686 | 38 | |
bpatel@1686 | 39 | //Javadoc arguments. |
bpatel@1686 | 40 | private static final String[] ARGS = new String[] { |
bpatel@1686 | 41 | "-d", BUG_ID, "-sourcepath", SRC_DIR, "-private", "typeannos" |
bpatel@1686 | 42 | }; |
bpatel@1686 | 43 | |
bpatel@1686 | 44 | //Input for string search tests. |
bpatel@1686 | 45 | private static final String[][] NEGATED_TEST = NO_TEST; |
bpatel@1686 | 46 | private static final String[][] TEST = { |
bpatel@1686 | 47 | // Test for type annotations on Class Extends (ClassExtends.java). |
bpatel@1691 | 48 | {BUG_ID + FS + "typeannos" + FS + "MyClass.html", |
bpatel@1691 | 49 | "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation " + |
bpatel@1691 | 50 | "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedClass.html\" " + |
bpatel@1691 | 51 | "title=\"class in typeannos\">ParameterizedClass</a><<a href=\"" + |
bpatel@1691 | 52 | "../typeannos/ClassExtB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 53 | "@ClassExtB</a> java.lang.String>" |
bpatel@1691 | 54 | }, |
bpatel@1686 | 55 | {BUG_ID + FS + "typeannos" + FS + "MyClass.html", |
bpatel@1686 | 56 | "implements <a href=\"../typeannos/ClassExtB.html\" title=\"" + |
bpatel@1686 | 57 | "annotation in typeannos\">@ClassExtB</a> java.lang.CharSequence, " + |
bpatel@1691 | 58 | "<a href=\"../typeannos/ClassExtA.html\" title=\"annotation in " + |
bpatel@1691 | 59 | "typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedInterface.html\" " + |
bpatel@1691 | 60 | "title=\"interface in typeannos\">ParameterizedInterface</a><" + |
bpatel@1691 | 61 | "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in " + |
bpatel@1691 | 62 | "typeannos\">@ClassExtB</a> java.lang.String></pre>" |
bpatel@1686 | 63 | }, |
bpatel@1686 | 64 | {BUG_ID + FS + "typeannos" + FS + "MyInterface.html", |
bpatel@1691 | 65 | "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation " + |
bpatel@1691 | 66 | "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/" + |
bpatel@1691 | 67 | "ParameterizedInterface.html\" title=\"interface in typeannos\">" + |
bpatel@1691 | 68 | "ParameterizedInterface</a><<a href=\"../typeannos/ClassExtA.html\" " + |
bpatel@1691 | 69 | "title=\"annotation in typeannos\">@ClassExtA</a> java.lang.String>, " + |
bpatel@1691 | 70 | "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in " + |
bpatel@1691 | 71 | "typeannos\">@ClassExtB</a> java.lang.CharSequence</pre>" |
bpatel@1686 | 72 | }, |
bpatel@1686 | 73 | |
bpatel@1686 | 74 | // Test for type annotations on Class Parameters (ClassParameters.java). |
bpatel@1686 | 75 | {BUG_ID + FS + "typeannos" + FS + "ExtendsBound.html", |
bpatel@1686 | 76 | "class <span class=\"strong\">ExtendsBound<K extends <a " + |
bpatel@1686 | 77 | "href=\"../typeannos/ClassParamA.html\" title=\"annotation in " + |
bpatel@1686 | 78 | "typeannos\">@ClassParamA</a> java.lang.String></span>" |
bpatel@1686 | 79 | }, |
bpatel@1691 | 80 | {BUG_ID + FS + "typeannos" + FS + "ExtendsGeneric.html", |
bpatel@1858 | 81 | "<pre>class <span class=\"strong\">ExtendsGeneric<K extends " + |
bpatel@1691 | 82 | "<a href=\"../typeannos/ClassParamA.html\" title=\"annotation in " + |
bpatel@1691 | 83 | "typeannos\">@ClassParamA</a> <a href=\"../typeannos/Unannotated.html\" " + |
bpatel@1691 | 84 | "title=\"class in typeannos\">Unannotated</a><<a href=\"" + |
bpatel@1691 | 85 | "../typeannos/ClassParamB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 86 | "@ClassParamB</a> java.lang.String>></span>" |
bpatel@1691 | 87 | }, |
bpatel@1686 | 88 | {BUG_ID + FS + "typeannos" + FS + "TwoBounds.html", |
bpatel@1858 | 89 | "<pre>class <span class=\"strong\">TwoBounds<K extends <a href=\"" + |
bpatel@1686 | 90 | "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 91 | "@ClassParamA</a> java.lang.String,V extends <a href=\"../typeannos/" + |
bpatel@1691 | 92 | "ClassParamB.html\" title=\"annotation in typeannos\">@ClassParamB" + |
bpatel@1686 | 93 | "</a> java.lang.String></span>" |
bpatel@1686 | 94 | }, |
bpatel@1686 | 95 | {BUG_ID + FS + "typeannos" + FS + "Complex1.html", |
bpatel@1686 | 96 | "class <span class=\"strong\">Complex1<K extends <a href=\"../" + |
bpatel@1686 | 97 | "typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" + |
jjg@1736 | 98 | "@ClassParamA</a> java.lang.String & java.lang.Runnable></span>" |
bpatel@1686 | 99 | }, |
bpatel@1686 | 100 | {BUG_ID + FS + "typeannos" + FS + "Complex2.html", |
bpatel@1686 | 101 | "class <span class=\"strong\">Complex2<K extends java.lang." + |
jjg@1736 | 102 | "String & <a href=\"../typeannos/ClassParamB.html\" title=\"" + |
bpatel@1686 | 103 | "annotation in typeannos\">@ClassParamB</a> java.lang.Runnable></span>" |
bpatel@1686 | 104 | }, |
bpatel@1686 | 105 | {BUG_ID + FS + "typeannos" + FS + "ComplexBoth.html", |
bpatel@1686 | 106 | "class <span class=\"strong\">ComplexBoth<K extends <a href=\"" + |
bpatel@1686 | 107 | "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\"" + |
jjg@1736 | 108 | ">@ClassParamA</a> java.lang.String & <a href=\"../typeannos/" + |
bpatel@1686 | 109 | "ClassParamA.html\" title=\"annotation in typeannos\">@ClassParamA" + |
bpatel@1686 | 110 | "</a> java.lang.Runnable></span>" |
bpatel@1686 | 111 | }, |
bpatel@1686 | 112 | |
bpatel@1691 | 113 | // Test for type annotations on fields (Fields.java). |
bpatel@1691 | 114 | {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html", |
bpatel@1691 | 115 | "<pre><a href=\"../typeannos/Parameterized.html\" title=\"class in " + |
bpatel@1691 | 116 | "typeannos\">Parameterized</a><<a href=\"../typeannos/FldA.html\" " + |
bpatel@1691 | 117 | "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a " + |
bpatel@1691 | 118 | "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 119 | "@FldB</a> java.lang.String> bothTypeArgs</pre>" |
bpatel@1691 | 120 | }, |
bpatel@1691 | 121 | {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html", |
bpatel@1691 | 122 | "<pre><a href=\"../typeannos/FldA.html\" title=\"annotation in " + |
bpatel@1691 | 123 | "typeannos\">@FldA</a> java.lang.String <a href=\"../typeannos/" + |
bpatel@1691 | 124 | "FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] " + |
bpatel@1691 | 125 | "array1Deep</pre>" |
bpatel@1691 | 126 | }, |
bpatel@1691 | 127 | {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html", |
bpatel@1691 | 128 | "<pre>java.lang.String[] <a href=\"../typeannos/FldB.html\" " + |
bpatel@1691 | 129 | "title=\"annotation in typeannos\">@FldB</a> [] array2SecondOld</pre>" |
bpatel@1691 | 130 | }, |
bpatel@1691 | 131 | {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html", |
bpatel@1691 | 132 | "<pre><a href=\"../typeannos/FldD.html\" title=\"annotation in " + |
bpatel@1691 | 133 | "typeannos\">@FldD</a> java.lang.String <a href=\"../typeannos/" + |
bpatel@1691 | 134 | "FldC.html\" title=\"annotation in typeannos\">@FldC</a> <a href=\"" + |
bpatel@1691 | 135 | "../typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA" + |
bpatel@1691 | 136 | "</a> [] <a href=\"../typeannos/FldC.html\" title=\"annotation in " + |
bpatel@1691 | 137 | "typeannos\">@FldC</a> <a href=\"../typeannos/FldB.html\" title=\"" + |
bpatel@1691 | 138 | "annotation in typeannos\">@FldB</a> [] array2Deep</pre>" |
bpatel@1691 | 139 | }, |
bpatel@1691 | 140 | {BUG_ID + FS + "typeannos" + FS + "ModifiedScoped.html", |
bpatel@1691 | 141 | "<pre>public final <a href=\"../typeannos/Parameterized.html\" " + |
bpatel@1691 | 142 | "title=\"class in typeannos\">Parameterized</a><<a href=\"../" + |
bpatel@1691 | 143 | "typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA</a> " + |
bpatel@1691 | 144 | "<a href=\"../typeannos/Parameterized.html\" title=\"class in " + |
bpatel@1691 | 145 | "typeannos\">Parameterized</a><<a href=\"../typeannos/FldA.html\" " + |
bpatel@1691 | 146 | "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a " + |
bpatel@1691 | 147 | "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 148 | "@FldB</a> java.lang.String>,<a href=\"../typeannos/FldB.html\" " + |
bpatel@1691 | 149 | "title=\"annotation in typeannos\">@FldB</a> java.lang.String> " + |
bpatel@1691 | 150 | "nestedParameterized</pre>" |
bpatel@1691 | 151 | }, |
bpatel@1691 | 152 | {BUG_ID + FS + "typeannos" + FS + "ModifiedScoped.html", |
bpatel@1691 | 153 | "<pre>public final <a href=\"../typeannos/FldA.html\" " + |
bpatel@1691 | 154 | "title=\"annotation in typeannos\">@FldA</a> java.lang.String[][] " + |
bpatel@1691 | 155 | "array2</pre>" |
bpatel@1691 | 156 | }, |
bpatel@1691 | 157 | |
bpatel@1686 | 158 | // Test for type annotations on method return types (MethodReturnType.java). |
bpatel@1686 | 159 | {BUG_ID + FS + "typeannos" + FS + "MtdDefaultScope.html", |
bpatel@1686 | 160 | "<pre>public <T> <a href=\"../typeannos/MRtnA.html\" " + |
bpatel@1686 | 161 | "title=\"annotation in typeannos\">@MRtnA</a> java.lang.String" + |
bpatel@1686 | 162 | " method()</pre>" |
bpatel@1686 | 163 | }, |
bpatel@1691 | 164 | {BUG_ID + FS + "typeannos" + FS + "MtdDefaultScope.html", |
bpatel@1691 | 165 | "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in " + |
bpatel@1691 | 166 | "typeannos\">@MRtnA</a> java.lang.String <a href=\"../typeannos/" + |
bpatel@1691 | 167 | "MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> [] <a " + |
bpatel@1691 | 168 | "href=\"../typeannos/MRtnB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 169 | "@MRtnB</a> [] array2Deep()</pre>" |
bpatel@1691 | 170 | }, |
bpatel@1691 | 171 | {BUG_ID + FS + "typeannos" + FS + "MtdDefaultScope.html", |
bpatel@1691 | 172 | "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in " + |
bpatel@1691 | 173 | "typeannos\">@MRtnA</a> java.lang.String[][] array2()</pre>" |
bpatel@1691 | 174 | }, |
bpatel@1691 | 175 | {BUG_ID + FS + "typeannos" + FS + "MtdModifiedScoped.html", |
bpatel@1691 | 176 | "<pre>public final <a href=\"../typeannos/MtdParameterized.html\" " + |
bpatel@1691 | 177 | "title=\"class in typeannos\">MtdParameterized</a><<a href=\"../" + |
bpatel@1691 | 178 | "typeannos/MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> " + |
bpatel@1691 | 179 | "<a href=\"../typeannos/MtdParameterized.html\" title=\"class in " + |
bpatel@1691 | 180 | "typeannos\">MtdParameterized</a><<a href=\"../typeannos/MRtnA." + |
bpatel@1691 | 181 | "html\" title=\"annotation in typeannos\">@MRtnA</a> java.lang." + |
bpatel@1691 | 182 | "String,<a href=\"../typeannos/MRtnB.html\" title=\"annotation in " + |
bpatel@1691 | 183 | "typeannos\">@MRtnB</a> java.lang.String>,<a href=\"../typeannos/" + |
bpatel@1691 | 184 | "MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> java." + |
bpatel@1691 | 185 | "lang.String> nestedMtdParameterized()</pre>" |
bpatel@1691 | 186 | }, |
bpatel@1686 | 187 | |
bpatel@1686 | 188 | // Test for type annotations on method type parameters (MethodTypeParameters.java). |
bpatel@1686 | 189 | {BUG_ID + FS + "typeannos" + FS + "UnscopedUnmodified.html", |
bpatel@1686 | 190 | "<pre><K extends <a href=\"../typeannos/MTyParamA.html\" title=\"" + |
bpatel@1686 | 191 | "annotation in typeannos\">@MTyParamA</a> java.lang.String>" + |
bpatel@1686 | 192 | " void methodExtends()</pre>" |
bpatel@1686 | 193 | }, |
bpatel@1691 | 194 | {BUG_ID + FS + "typeannos" + FS + "UnscopedUnmodified.html", |
bpatel@1691 | 195 | "<pre><K extends <a href=\"../typeannos/MTyParamA.html\" title=\"" + |
bpatel@1691 | 196 | "annotation in typeannos\">@MTyParamA</a> <a href=\"../typeannos/" + |
bpatel@1691 | 197 | "MtdTyParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 198 | "MtdTyParameterized</a><<a href=\"../typeannos/MTyParamB.html\" " + |
bpatel@1691 | 199 | "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String" + |
bpatel@1691 | 200 | ">> void nestedExtends()</pre>" |
bpatel@1691 | 201 | }, |
bpatel@1686 | 202 | {BUG_ID + FS + "typeannos" + FS + "PublicModifiedMethods.html", |
bpatel@1686 | 203 | "<pre>public final <K extends <a href=\"../typeannos/" + |
bpatel@1686 | 204 | "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " + |
bpatel@1686 | 205 | "java.lang.String> void methodExtends()</pre>" |
bpatel@1686 | 206 | }, |
bpatel@1691 | 207 | {BUG_ID + FS + "typeannos" + FS + "PublicModifiedMethods.html", |
bpatel@1691 | 208 | "<pre>public final <K extends <a href=\"../typeannos/" + |
bpatel@1691 | 209 | "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " + |
bpatel@1691 | 210 | "java.lang.String,V extends <a href=\"../typeannos/MTyParamA.html\" " + |
bpatel@1691 | 211 | "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\"../" + |
bpatel@1691 | 212 | "typeannos/MtdTyParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 213 | "MtdTyParameterized</a><<a href=\"../typeannos/MTyParamB.html\" " + |
bpatel@1691 | 214 | "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String" + |
bpatel@1691 | 215 | ">> void dual()</pre>" |
bpatel@1691 | 216 | }, |
bpatel@1691 | 217 | |
bpatel@1691 | 218 | // Test for type annotations on parameters (Parameters.java). |
bpatel@1691 | 219 | {BUG_ID + FS + "typeannos" + FS + "Parameters.html", |
bpatel@1691 | 220 | "<pre>void unannotated(<a href=\"../typeannos/" + |
bpatel@1691 | 221 | "ParaParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 222 | "ParaParameterized</a><java.lang.String,java.lang.String>" + |
bpatel@1691 | 223 | " a)</pre>" |
bpatel@1691 | 224 | }, |
bpatel@1691 | 225 | {BUG_ID + FS + "typeannos" + FS + "Parameters.html", |
bpatel@1691 | 226 | "<pre>void nestedParaParameterized(<a href=\"../typeannos/" + |
bpatel@1691 | 227 | "ParaParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 228 | "ParaParameterized</a><<a href=\"../typeannos/ParamA.html\" " + |
bpatel@1691 | 229 | "title=\"annotation in typeannos\">@ParamA</a> <a href=\"../" + |
bpatel@1691 | 230 | "typeannos/ParaParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 231 | "ParaParameterized</a><<a href=\"../typeannos/ParamA.html\" " + |
bpatel@1691 | 232 | "title=\"annotation in typeannos\">@ParamA</a> java.lang.String," + |
bpatel@1691 | 233 | "<a href=\"../typeannos/ParamB.html\" title=\"annotation in " + |
bpatel@1691 | 234 | "typeannos\">@ParamB</a> java.lang.String>,<a href=\"../" + |
bpatel@1691 | 235 | "typeannos/ParamB.html\" title=\"annotation in typeannos\">@ParamB" + |
bpatel@1691 | 236 | "</a> java.lang.String> a)</pre>" |
bpatel@1691 | 237 | }, |
bpatel@1691 | 238 | {BUG_ID + FS + "typeannos" + FS + "Parameters.html", |
bpatel@1691 | 239 | "<pre>void array2Deep(<a href=\"../typeannos/ParamA.html\" " + |
bpatel@1691 | 240 | "title=\"annotation in typeannos\">@ParamA</a> java.lang.String " + |
bpatel@1691 | 241 | "<a href=\"../typeannos/ParamA.html\" title=\"annotation in " + |
bpatel@1691 | 242 | "typeannos\">@ParamA</a> [] <a href=\"../typeannos/ParamB.html\" " + |
bpatel@1691 | 243 | "title=\"annotation in typeannos\">@ParamB</a> [] a)</pre>" |
bpatel@1691 | 244 | }, |
bpatel@1686 | 245 | |
bpatel@1686 | 246 | // Test for type annotations on throws (Throws.java). |
bpatel@1686 | 247 | {BUG_ID + FS + "typeannos" + FS + "ThrDefaultUnmodified.html", |
bpatel@1686 | 248 | "<pre>void oneException()" + NL + |
jjg@1741 | 249 | " throws <a href=\"../typeannos/ThrA.html\" title=\"" + |
bpatel@1686 | 250 | "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 251 | }, |
bpatel@1686 | 252 | {BUG_ID + FS + "typeannos" + FS + "ThrDefaultUnmodified.html", |
bpatel@1686 | 253 | "<pre>void twoExceptions()" + NL + |
jjg@1741 | 254 | " throws <a href=\"../typeannos/ThrA.html\" title=\"" + |
bpatel@1686 | 255 | "annotation in typeannos\">@ThrA</a> java.lang.RuntimeException," + NL + |
jjg@1741 | 256 | " <a href=\"../typeannos/ThrA.html\" title=\"" + |
bpatel@1686 | 257 | "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 258 | }, |
bpatel@1686 | 259 | {BUG_ID + FS + "typeannos" + FS + "ThrPublicModified.html", |
bpatel@1686 | 260 | "<pre>public final void oneException(java.lang.String a)" + NL + |
bpatel@1686 | 261 | " throws <a href=\"../typeannos/ThrA.html\" " + |
bpatel@1686 | 262 | "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 263 | }, |
bpatel@1686 | 264 | {BUG_ID + FS + "typeannos" + FS + "ThrPublicModified.html", |
bpatel@1686 | 265 | "<pre>public final void twoExceptions(java.lang.String a)" + NL + |
bpatel@1686 | 266 | " throws <a href=\"../typeannos/ThrA.html\" " + |
bpatel@1686 | 267 | "title=\"annotation in typeannos\">@ThrA</a> java.lang.RuntimeException," + NL + |
bpatel@1686 | 268 | " <a href=\"../typeannos/ThrA.html\" " + |
bpatel@1686 | 269 | "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 270 | }, |
bpatel@1686 | 271 | {BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html", |
bpatel@1686 | 272 | "<pre>void oneException()" + NL + |
jjg@1741 | 273 | " throws <a href=\"../typeannos/ThrB.html\" title=\"" + |
bpatel@1686 | 274 | "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" + |
bpatel@1686 | 275 | "ThrB.html#value()\">value</a>=\"m\") java.lang.Exception</pre>" |
bpatel@1686 | 276 | }, |
bpatel@1686 | 277 | {BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html", |
bpatel@1686 | 278 | "<pre>void twoExceptions()" + NL + |
jjg@1741 | 279 | " throws <a href=\"../typeannos/ThrB.html\" title=\"" + |
bpatel@1686 | 280 | "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" + |
bpatel@1686 | 281 | "ThrB.html#value()\">value</a>=\"m\") java.lang.RuntimeException," + NL + |
jjg@1741 | 282 | " <a href=\"../typeannos/ThrA.html\" title=\"" + |
bpatel@1686 | 283 | "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 284 | }, |
bpatel@1686 | 285 | |
bpatel@1691 | 286 | // Test for type annotations on type parameters (TypeParameters.java). |
bpatel@1691 | 287 | {BUG_ID + FS + "typeannos" + FS + "TestMethods.html", |
bpatel@1691 | 288 | "<pre><K,V extends <a href=\"../typeannos/TyParaA.html\" title=\"" + |
bpatel@1691 | 289 | "annotation in typeannos\">@TyParaA</a> java.lang.String> " + |
bpatel@1691 | 290 | "void secondAnnotated()</pre>" |
bpatel@1691 | 291 | }, |
bpatel@1691 | 292 | |
bpatel@1686 | 293 | // Test for type annotations on wildcard type (Wildcards.java). |
bpatel@1686 | 294 | {BUG_ID + FS + "typeannos" + FS + "BoundTest.html", |
bpatel@1686 | 295 | "<pre>void wcExtends(<a href=\"../typeannos/MyList.html\" " + |
bpatel@1686 | 296 | "title=\"class in typeannos\">MyList</a><? extends <a href=\"" + |
bpatel@1686 | 297 | "../typeannos/WldA.html\" title=\"annotation in typeannos\">@WldA" + |
bpatel@1686 | 298 | "</a> java.lang.String> l)</pre>" |
bpatel@1686 | 299 | }, |
bpatel@1686 | 300 | {BUG_ID + FS + "typeannos" + FS + "BoundTest.html", |
bpatel@1686 | 301 | "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " + |
bpatel@1686 | 302 | "typeannos\">MyList</a><? super <a href=\"../typeannos/WldA.html\" " + |
bpatel@1686 | 303 | "title=\"annotation in typeannos\">@WldA</a> java.lang.String>" + |
bpatel@1686 | 304 | " returnWcSuper()</pre>" |
bpatel@1686 | 305 | }, |
bpatel@1686 | 306 | {BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html", |
bpatel@1686 | 307 | "<pre>void wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" + |
bpatel@1686 | 308 | "class in typeannos\">MyList</a><? super <a href=\"../typeannos/" + |
bpatel@1686 | 309 | "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"" + |
bpatel@1686 | 310 | "../typeannos/WldB.html#value()\">value</a>=\"m\") java.lang." + |
bpatel@1686 | 311 | "String> l)</pre>" |
bpatel@1686 | 312 | }, |
bpatel@1686 | 313 | {BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html", |
bpatel@1686 | 314 | "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " + |
bpatel@1686 | 315 | "typeannos\">MyList</a><? extends <a href=\"../typeannos/WldB." + |
bpatel@1686 | 316 | "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../" + |
bpatel@1686 | 317 | "typeannos/WldB.html#value()\">value</a>=\"m\") java.lang.String" + |
bpatel@1686 | 318 | "> returnWcExtends()</pre>" |
bpatel@1686 | 319 | }, |
bpatel@1686 | 320 | |
bpatel@1686 | 321 | // Test for receiver annotations (Receivers.java). |
bpatel@1686 | 322 | {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html", |
bpatel@1686 | 323 | "<pre>void withException(<a href=\"../typeannos/RcvrA.html\" " + |
bpatel@1686 | 324 | "title=\"annotation in typeannos\">@RcvrA</a> " + |
jjg@1741 | 325 | "DefaultUnmodified this)" + NL + " throws java." + |
bpatel@1686 | 326 | "lang.Exception</pre>" |
bpatel@1686 | 327 | }, |
bpatel@1686 | 328 | {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html", |
bpatel@1686 | 329 | "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrA." + |
bpatel@1686 | 330 | "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../" + |
bpatel@1686 | 331 | "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" + |
bpatel@1686 | 332 | "</a>(<a href=\"../typeannos/RcvrB.html#value()\">value</a>=\"m\")" + |
bpatel@1686 | 333 | " DefaultUnmodified this)</pre>" |
bpatel@1686 | 334 | }, |
bpatel@1686 | 335 | {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html", |
bpatel@1686 | 336 | "<pre><T extends java.lang.Runnable> void accept(" + |
bpatel@1686 | 337 | "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in " + |
bpatel@1686 | 338 | "typeannos\">@RcvrA</a> DefaultUnmodified this," + NL + |
jjg@1741 | 339 | " T r)" + NL + |
jjg@1741 | 340 | " throws java.lang.Exception</pre>" |
bpatel@1686 | 341 | }, |
bpatel@1686 | 342 | {BUG_ID + FS + "typeannos" + FS + "PublicModified.html", |
bpatel@1686 | 343 | "<pre>public final java.lang.String nonVoid(<a href=\"" + |
bpatel@1686 | 344 | "../typeannos/RcvrA.html\" title=\"annotation in typeannos\">" + |
bpatel@1686 | 345 | "@RcvrA</a> PublicModified this)</pre>" |
bpatel@1686 | 346 | }, |
bpatel@1686 | 347 | {BUG_ID + FS + "typeannos" + FS + "PublicModified.html", |
bpatel@1686 | 348 | "<pre>public final <T extends java.lang.Runnable> " + |
bpatel@1686 | 349 | "void accept(<a href=\"../typeannos/RcvrA.html\" title=\"" + |
bpatel@1686 | 350 | "annotation in typeannos\">@RcvrA</a> PublicModified this," + NL + |
jjg@1741 | 351 | " T r)" + NL + |
jjg@1741 | 352 | " throws java.lang.Exception</pre>" |
bpatel@1686 | 353 | }, |
bpatel@1686 | 354 | {BUG_ID + FS + "typeannos" + FS + "WithValue.html", |
bpatel@1686 | 355 | "<pre><T extends java.lang.Runnable> void accept(" + |
bpatel@1686 | 356 | "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in " + |
bpatel@1686 | 357 | "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value()\">" + |
bpatel@1686 | 358 | "value</a>=\"m\") WithValue this," + NL + |
jjg@1741 | 359 | " T r)" + NL + |
jjg@1741 | 360 | " throws java.lang.Exception</pre>" |
bpatel@1686 | 361 | }, |
bpatel@1686 | 362 | {BUG_ID + FS + "typeannos" + FS + "WithFinal.html", |
bpatel@1686 | 363 | "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrB." + |
bpatel@1686 | 364 | "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../" + |
bpatel@1686 | 365 | "typeannos/RcvrB.html#value()\">value</a>=\"m\") WithFinal" + |
bpatel@1686 | 366 | " this)</pre>" |
bpatel@1686 | 367 | }, |
bpatel@1686 | 368 | {BUG_ID + FS + "typeannos" + FS + "WithBody.html", |
bpatel@1686 | 369 | "<pre>void field(<a href=\"../typeannos/RcvrA.html\" title=\"" + |
bpatel@1686 | 370 | "annotation in typeannos\">@RcvrA</a> WithBody this)</pre>" |
bpatel@1686 | 371 | }, |
bpatel@1686 | 372 | {BUG_ID + FS + "typeannos" + FS + "Generic2.html", |
bpatel@1686 | 373 | "<pre>void test2(<a href=\"../typeannos/RcvrA.html\" title=\"" + |
bpatel@1686 | 374 | "annotation in typeannos\">@RcvrA</a> Generic2<X> this)</pre>" |
bpatel@1686 | 375 | } |
bpatel@1686 | 376 | }; |
bpatel@1686 | 377 | |
bpatel@1686 | 378 | /** |
bpatel@1686 | 379 | * The entry point of the test. |
bpatel@1686 | 380 | * @param args the array of command line arguments. |
bpatel@1686 | 381 | */ |
bpatel@1686 | 382 | public static void main(String[] args) { |
bpatel@1686 | 383 | TestTypeAnnotations tester = new TestTypeAnnotations(); |
bpatel@1686 | 384 | run(tester, ARGS, TEST, NEGATED_TEST); |
bpatel@1686 | 385 | tester.printSummary(); |
bpatel@1686 | 386 | } |
bpatel@1686 | 387 | |
bpatel@1686 | 388 | /** |
bpatel@1686 | 389 | * {@inheritDoc} |
bpatel@1686 | 390 | */ |
bpatel@1686 | 391 | public String getBugId() { |
bpatel@1686 | 392 | return BUG_ID; |
bpatel@1686 | 393 | } |
bpatel@1686 | 394 | |
bpatel@1686 | 395 | /** |
bpatel@1686 | 396 | * {@inheritDoc} |
bpatel@1686 | 397 | */ |
bpatel@1686 | 398 | public String getBugName() { |
bpatel@1686 | 399 | return getClass().getName(); |
bpatel@1686 | 400 | } |
bpatel@1686 | 401 | } |