Wed, 08 Oct 2014 12:38:55 -0700
Added tag jdk8u40-b09 for changeset 8bb38a350722
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@2147 | 26 | * @bug 8005091 8009686 8025633 8026567 |
bpatel@1686 | 27 | * @summary Make sure that type annotations are displayed correctly |
bpatel@1686 | 28 | * @author Bhavesh Patel |
bpatel@1686 | 29 | * @library ../lib/ |
jjg@2134 | 30 | * @ignore |
bpatel@1686 | 31 | * @build JavadocTester TestTypeAnnotations |
bpatel@1686 | 32 | * @run main TestTypeAnnotations |
bpatel@1686 | 33 | */ |
bpatel@1686 | 34 | |
bpatel@1686 | 35 | public class TestTypeAnnotations extends JavadocTester { |
bpatel@1686 | 36 | |
bpatel@1686 | 37 | //Test information. |
bpatel@1691 | 38 | private static final String BUG_ID = "8005091-8009686"; |
bpatel@1686 | 39 | |
bpatel@1686 | 40 | //Javadoc arguments. |
bpatel@1686 | 41 | private static final String[] ARGS = new String[] { |
bpatel@1686 | 42 | "-d", BUG_ID, "-sourcepath", SRC_DIR, "-private", "typeannos" |
bpatel@1686 | 43 | }; |
bpatel@1686 | 44 | |
bpatel@1686 | 45 | //Input for string search tests. |
bpatel@1686 | 46 | private static final String[][] NEGATED_TEST = NO_TEST; |
bpatel@1686 | 47 | private static final String[][] TEST = { |
bpatel@1686 | 48 | // Test for type annotations on Class Extends (ClassExtends.java). |
bpatel@1691 | 49 | {BUG_ID + FS + "typeannos" + FS + "MyClass.html", |
bpatel@1691 | 50 | "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation " + |
bpatel@1691 | 51 | "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedClass.html\" " + |
bpatel@1691 | 52 | "title=\"class in typeannos\">ParameterizedClass</a><<a href=\"" + |
bpatel@1691 | 53 | "../typeannos/ClassExtB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 54 | "@ClassExtB</a> java.lang.String>" |
bpatel@1691 | 55 | }, |
bpatel@1686 | 56 | {BUG_ID + FS + "typeannos" + FS + "MyClass.html", |
bpatel@1686 | 57 | "implements <a href=\"../typeannos/ClassExtB.html\" title=\"" + |
bpatel@1686 | 58 | "annotation in typeannos\">@ClassExtB</a> java.lang.CharSequence, " + |
bpatel@1691 | 59 | "<a href=\"../typeannos/ClassExtA.html\" title=\"annotation in " + |
bpatel@1691 | 60 | "typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedInterface.html\" " + |
bpatel@1691 | 61 | "title=\"interface in typeannos\">ParameterizedInterface</a><" + |
bpatel@1691 | 62 | "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in " + |
bpatel@1691 | 63 | "typeannos\">@ClassExtB</a> java.lang.String></pre>" |
bpatel@1686 | 64 | }, |
bpatel@1686 | 65 | {BUG_ID + FS + "typeannos" + FS + "MyInterface.html", |
bpatel@1691 | 66 | "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation " + |
bpatel@1691 | 67 | "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/" + |
bpatel@1691 | 68 | "ParameterizedInterface.html\" title=\"interface in typeannos\">" + |
bpatel@1691 | 69 | "ParameterizedInterface</a><<a href=\"../typeannos/ClassExtA.html\" " + |
bpatel@1691 | 70 | "title=\"annotation in typeannos\">@ClassExtA</a> java.lang.String>, " + |
bpatel@1691 | 71 | "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in " + |
bpatel@1691 | 72 | "typeannos\">@ClassExtB</a> java.lang.CharSequence</pre>" |
bpatel@1686 | 73 | }, |
bpatel@1686 | 74 | |
bpatel@1686 | 75 | // Test for type annotations on Class Parameters (ClassParameters.java). |
bpatel@1686 | 76 | {BUG_ID + FS + "typeannos" + FS + "ExtendsBound.html", |
bpatel@2147 | 77 | "class <span class=\"typeNameLabel\">ExtendsBound<K extends <a " + |
bpatel@1686 | 78 | "href=\"../typeannos/ClassParamA.html\" title=\"annotation in " + |
bpatel@1686 | 79 | "typeannos\">@ClassParamA</a> java.lang.String></span>" |
bpatel@1686 | 80 | }, |
bpatel@1691 | 81 | {BUG_ID + FS + "typeannos" + FS + "ExtendsGeneric.html", |
bpatel@2147 | 82 | "<pre>class <span class=\"typeNameLabel\">ExtendsGeneric<K extends " + |
bpatel@1691 | 83 | "<a href=\"../typeannos/ClassParamA.html\" title=\"annotation in " + |
bpatel@1691 | 84 | "typeannos\">@ClassParamA</a> <a href=\"../typeannos/Unannotated.html\" " + |
bpatel@1691 | 85 | "title=\"class in typeannos\">Unannotated</a><<a href=\"" + |
bpatel@1691 | 86 | "../typeannos/ClassParamB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 87 | "@ClassParamB</a> java.lang.String>></span>" |
bpatel@1691 | 88 | }, |
bpatel@1686 | 89 | {BUG_ID + FS + "typeannos" + FS + "TwoBounds.html", |
bpatel@2147 | 90 | "<pre>class <span class=\"typeNameLabel\">TwoBounds<K extends <a href=\"" + |
bpatel@1686 | 91 | "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 92 | "@ClassParamA</a> java.lang.String,V extends <a href=\"../typeannos/" + |
bpatel@1691 | 93 | "ClassParamB.html\" title=\"annotation in typeannos\">@ClassParamB" + |
bpatel@1686 | 94 | "</a> java.lang.String></span>" |
bpatel@1686 | 95 | }, |
bpatel@1686 | 96 | {BUG_ID + FS + "typeannos" + FS + "Complex1.html", |
bpatel@2147 | 97 | "class <span class=\"typeNameLabel\">Complex1<K extends <a href=\"../" + |
bpatel@1686 | 98 | "typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" + |
jjg@1736 | 99 | "@ClassParamA</a> java.lang.String & java.lang.Runnable></span>" |
bpatel@1686 | 100 | }, |
bpatel@1686 | 101 | {BUG_ID + FS + "typeannos" + FS + "Complex2.html", |
bpatel@2147 | 102 | "class <span class=\"typeNameLabel\">Complex2<K extends java.lang." + |
jjg@1736 | 103 | "String & <a href=\"../typeannos/ClassParamB.html\" title=\"" + |
bpatel@1686 | 104 | "annotation in typeannos\">@ClassParamB</a> java.lang.Runnable></span>" |
bpatel@1686 | 105 | }, |
bpatel@1686 | 106 | {BUG_ID + FS + "typeannos" + FS + "ComplexBoth.html", |
bpatel@2147 | 107 | "class <span class=\"typeNameLabel\">ComplexBoth<K extends <a href=\"" + |
bpatel@1686 | 108 | "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\"" + |
jjg@1736 | 109 | ">@ClassParamA</a> java.lang.String & <a href=\"../typeannos/" + |
bpatel@1686 | 110 | "ClassParamA.html\" title=\"annotation in typeannos\">@ClassParamA" + |
bpatel@1686 | 111 | "</a> java.lang.Runnable></span>" |
bpatel@1686 | 112 | }, |
bpatel@1686 | 113 | |
bpatel@1691 | 114 | // Test for type annotations on fields (Fields.java). |
bpatel@1691 | 115 | {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html", |
bpatel@1691 | 116 | "<pre><a href=\"../typeannos/Parameterized.html\" title=\"class in " + |
bpatel@1691 | 117 | "typeannos\">Parameterized</a><<a href=\"../typeannos/FldA.html\" " + |
bpatel@1691 | 118 | "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a " + |
bpatel@1691 | 119 | "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 120 | "@FldB</a> java.lang.String> bothTypeArgs</pre>" |
bpatel@1691 | 121 | }, |
bpatel@1691 | 122 | {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html", |
bpatel@1691 | 123 | "<pre><a href=\"../typeannos/FldA.html\" title=\"annotation in " + |
bpatel@1691 | 124 | "typeannos\">@FldA</a> java.lang.String <a href=\"../typeannos/" + |
bpatel@1691 | 125 | "FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] " + |
bpatel@1691 | 126 | "array1Deep</pre>" |
bpatel@1691 | 127 | }, |
bpatel@1691 | 128 | {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html", |
bpatel@1691 | 129 | "<pre>java.lang.String[] <a href=\"../typeannos/FldB.html\" " + |
bpatel@1691 | 130 | "title=\"annotation in typeannos\">@FldB</a> [] array2SecondOld</pre>" |
bpatel@1691 | 131 | }, |
bpatel@1691 | 132 | {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html", |
bpatel@1691 | 133 | "<pre><a href=\"../typeannos/FldD.html\" title=\"annotation in " + |
bpatel@1691 | 134 | "typeannos\">@FldD</a> java.lang.String <a href=\"../typeannos/" + |
bpatel@1691 | 135 | "FldC.html\" title=\"annotation in typeannos\">@FldC</a> <a href=\"" + |
bpatel@1691 | 136 | "../typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA" + |
bpatel@1691 | 137 | "</a> [] <a href=\"../typeannos/FldC.html\" title=\"annotation in " + |
bpatel@1691 | 138 | "typeannos\">@FldC</a> <a href=\"../typeannos/FldB.html\" title=\"" + |
bpatel@1691 | 139 | "annotation in typeannos\">@FldB</a> [] array2Deep</pre>" |
bpatel@1691 | 140 | }, |
bpatel@1691 | 141 | {BUG_ID + FS + "typeannos" + FS + "ModifiedScoped.html", |
bpatel@1691 | 142 | "<pre>public final <a href=\"../typeannos/Parameterized.html\" " + |
bpatel@1691 | 143 | "title=\"class in typeannos\">Parameterized</a><<a href=\"../" + |
bpatel@1691 | 144 | "typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA</a> " + |
bpatel@1691 | 145 | "<a href=\"../typeannos/Parameterized.html\" title=\"class in " + |
bpatel@1691 | 146 | "typeannos\">Parameterized</a><<a href=\"../typeannos/FldA.html\" " + |
bpatel@1691 | 147 | "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a " + |
bpatel@1691 | 148 | "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 149 | "@FldB</a> java.lang.String>,<a href=\"../typeannos/FldB.html\" " + |
bpatel@1691 | 150 | "title=\"annotation in typeannos\">@FldB</a> java.lang.String> " + |
bpatel@1691 | 151 | "nestedParameterized</pre>" |
bpatel@1691 | 152 | }, |
bpatel@1691 | 153 | {BUG_ID + FS + "typeannos" + FS + "ModifiedScoped.html", |
bpatel@1691 | 154 | "<pre>public final <a href=\"../typeannos/FldA.html\" " + |
bpatel@1691 | 155 | "title=\"annotation in typeannos\">@FldA</a> java.lang.String[][] " + |
bpatel@1691 | 156 | "array2</pre>" |
bpatel@1691 | 157 | }, |
bpatel@1691 | 158 | |
bpatel@1686 | 159 | // Test for type annotations on method return types (MethodReturnType.java). |
bpatel@1686 | 160 | {BUG_ID + FS + "typeannos" + FS + "MtdDefaultScope.html", |
bpatel@1686 | 161 | "<pre>public <T> <a href=\"../typeannos/MRtnA.html\" " + |
bpatel@1686 | 162 | "title=\"annotation in typeannos\">@MRtnA</a> java.lang.String" + |
bpatel@1686 | 163 | " method()</pre>" |
bpatel@1686 | 164 | }, |
bpatel@1691 | 165 | {BUG_ID + FS + "typeannos" + FS + "MtdDefaultScope.html", |
bpatel@1691 | 166 | "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in " + |
bpatel@1691 | 167 | "typeannos\">@MRtnA</a> java.lang.String <a href=\"../typeannos/" + |
bpatel@1691 | 168 | "MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> [] <a " + |
bpatel@1691 | 169 | "href=\"../typeannos/MRtnB.html\" title=\"annotation in typeannos\">" + |
bpatel@1691 | 170 | "@MRtnB</a> [] array2Deep()</pre>" |
bpatel@1691 | 171 | }, |
bpatel@1691 | 172 | {BUG_ID + FS + "typeannos" + FS + "MtdDefaultScope.html", |
bpatel@1691 | 173 | "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in " + |
bpatel@1691 | 174 | "typeannos\">@MRtnA</a> java.lang.String[][] array2()</pre>" |
bpatel@1691 | 175 | }, |
bpatel@1691 | 176 | {BUG_ID + FS + "typeannos" + FS + "MtdModifiedScoped.html", |
bpatel@1691 | 177 | "<pre>public final <a href=\"../typeannos/MtdParameterized.html\" " + |
bpatel@1691 | 178 | "title=\"class in typeannos\">MtdParameterized</a><<a href=\"../" + |
bpatel@1691 | 179 | "typeannos/MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> " + |
bpatel@1691 | 180 | "<a href=\"../typeannos/MtdParameterized.html\" title=\"class in " + |
bpatel@1691 | 181 | "typeannos\">MtdParameterized</a><<a href=\"../typeannos/MRtnA." + |
bpatel@1691 | 182 | "html\" title=\"annotation in typeannos\">@MRtnA</a> java.lang." + |
bpatel@1691 | 183 | "String,<a href=\"../typeannos/MRtnB.html\" title=\"annotation in " + |
bpatel@1691 | 184 | "typeannos\">@MRtnB</a> java.lang.String>,<a href=\"../typeannos/" + |
bpatel@1691 | 185 | "MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> java." + |
bpatel@1691 | 186 | "lang.String> nestedMtdParameterized()</pre>" |
bpatel@1691 | 187 | }, |
bpatel@1686 | 188 | |
bpatel@1686 | 189 | // Test for type annotations on method type parameters (MethodTypeParameters.java). |
bpatel@1686 | 190 | {BUG_ID + FS + "typeannos" + FS + "UnscopedUnmodified.html", |
bpatel@1686 | 191 | "<pre><K extends <a href=\"../typeannos/MTyParamA.html\" title=\"" + |
bpatel@1686 | 192 | "annotation in typeannos\">@MTyParamA</a> java.lang.String>" + |
bpatel@1686 | 193 | " void methodExtends()</pre>" |
bpatel@1686 | 194 | }, |
bpatel@1691 | 195 | {BUG_ID + FS + "typeannos" + FS + "UnscopedUnmodified.html", |
bpatel@1691 | 196 | "<pre><K extends <a href=\"../typeannos/MTyParamA.html\" title=\"" + |
bpatel@1691 | 197 | "annotation in typeannos\">@MTyParamA</a> <a href=\"../typeannos/" + |
bpatel@1691 | 198 | "MtdTyParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 199 | "MtdTyParameterized</a><<a href=\"../typeannos/MTyParamB.html\" " + |
bpatel@1691 | 200 | "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String" + |
bpatel@1691 | 201 | ">> void nestedExtends()</pre>" |
bpatel@1691 | 202 | }, |
bpatel@1686 | 203 | {BUG_ID + FS + "typeannos" + FS + "PublicModifiedMethods.html", |
bpatel@1686 | 204 | "<pre>public final <K extends <a href=\"../typeannos/" + |
bpatel@1686 | 205 | "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " + |
bpatel@1686 | 206 | "java.lang.String> void methodExtends()</pre>" |
bpatel@1686 | 207 | }, |
bpatel@1691 | 208 | {BUG_ID + FS + "typeannos" + FS + "PublicModifiedMethods.html", |
bpatel@1691 | 209 | "<pre>public final <K extends <a href=\"../typeannos/" + |
bpatel@1691 | 210 | "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " + |
bpatel@1691 | 211 | "java.lang.String,V extends <a href=\"../typeannos/MTyParamA.html\" " + |
bpatel@1691 | 212 | "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\"../" + |
bpatel@1691 | 213 | "typeannos/MtdTyParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 214 | "MtdTyParameterized</a><<a href=\"../typeannos/MTyParamB.html\" " + |
bpatel@1691 | 215 | "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String" + |
bpatel@1691 | 216 | ">> void dual()</pre>" |
bpatel@1691 | 217 | }, |
bpatel@1691 | 218 | |
bpatel@1691 | 219 | // Test for type annotations on parameters (Parameters.java). |
bpatel@1691 | 220 | {BUG_ID + FS + "typeannos" + FS + "Parameters.html", |
bpatel@1691 | 221 | "<pre>void unannotated(<a href=\"../typeannos/" + |
bpatel@1691 | 222 | "ParaParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 223 | "ParaParameterized</a><java.lang.String,java.lang.String>" + |
bpatel@1691 | 224 | " a)</pre>" |
bpatel@1691 | 225 | }, |
bpatel@1691 | 226 | {BUG_ID + FS + "typeannos" + FS + "Parameters.html", |
bpatel@1691 | 227 | "<pre>void nestedParaParameterized(<a href=\"../typeannos/" + |
bpatel@1691 | 228 | "ParaParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 229 | "ParaParameterized</a><<a href=\"../typeannos/ParamA.html\" " + |
bpatel@1691 | 230 | "title=\"annotation in typeannos\">@ParamA</a> <a href=\"../" + |
bpatel@1691 | 231 | "typeannos/ParaParameterized.html\" title=\"class in typeannos\">" + |
bpatel@1691 | 232 | "ParaParameterized</a><<a href=\"../typeannos/ParamA.html\" " + |
bpatel@1691 | 233 | "title=\"annotation in typeannos\">@ParamA</a> java.lang.String," + |
bpatel@1691 | 234 | "<a href=\"../typeannos/ParamB.html\" title=\"annotation in " + |
bpatel@1691 | 235 | "typeannos\">@ParamB</a> java.lang.String>,<a href=\"../" + |
bpatel@1691 | 236 | "typeannos/ParamB.html\" title=\"annotation in typeannos\">@ParamB" + |
bpatel@1691 | 237 | "</a> java.lang.String> a)</pre>" |
bpatel@1691 | 238 | }, |
bpatel@1691 | 239 | {BUG_ID + FS + "typeannos" + FS + "Parameters.html", |
bpatel@1691 | 240 | "<pre>void array2Deep(<a href=\"../typeannos/ParamA.html\" " + |
bpatel@1691 | 241 | "title=\"annotation in typeannos\">@ParamA</a> java.lang.String " + |
bpatel@1691 | 242 | "<a href=\"../typeannos/ParamA.html\" title=\"annotation in " + |
bpatel@1691 | 243 | "typeannos\">@ParamA</a> [] <a href=\"../typeannos/ParamB.html\" " + |
bpatel@1691 | 244 | "title=\"annotation in typeannos\">@ParamB</a> [] a)</pre>" |
bpatel@1691 | 245 | }, |
bpatel@1686 | 246 | |
bpatel@1686 | 247 | // Test for type annotations on throws (Throws.java). |
bpatel@1686 | 248 | {BUG_ID + FS + "typeannos" + FS + "ThrDefaultUnmodified.html", |
bpatel@1686 | 249 | "<pre>void oneException()" + NL + |
jjg@1741 | 250 | " throws <a href=\"../typeannos/ThrA.html\" title=\"" + |
bpatel@1686 | 251 | "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 252 | }, |
bpatel@1686 | 253 | {BUG_ID + FS + "typeannos" + FS + "ThrDefaultUnmodified.html", |
bpatel@1686 | 254 | "<pre>void twoExceptions()" + NL + |
jjg@1741 | 255 | " throws <a href=\"../typeannos/ThrA.html\" title=\"" + |
bpatel@1686 | 256 | "annotation in typeannos\">@ThrA</a> java.lang.RuntimeException," + NL + |
jjg@1741 | 257 | " <a href=\"../typeannos/ThrA.html\" title=\"" + |
bpatel@1686 | 258 | "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 259 | }, |
bpatel@1686 | 260 | {BUG_ID + FS + "typeannos" + FS + "ThrPublicModified.html", |
bpatel@1686 | 261 | "<pre>public final void oneException(java.lang.String a)" + NL + |
bpatel@1686 | 262 | " throws <a href=\"../typeannos/ThrA.html\" " + |
bpatel@1686 | 263 | "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 264 | }, |
bpatel@1686 | 265 | {BUG_ID + FS + "typeannos" + FS + "ThrPublicModified.html", |
bpatel@1686 | 266 | "<pre>public final void twoExceptions(java.lang.String a)" + NL + |
bpatel@1686 | 267 | " throws <a href=\"../typeannos/ThrA.html\" " + |
bpatel@1686 | 268 | "title=\"annotation in typeannos\">@ThrA</a> java.lang.RuntimeException," + NL + |
bpatel@1686 | 269 | " <a href=\"../typeannos/ThrA.html\" " + |
bpatel@1686 | 270 | "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 271 | }, |
bpatel@1686 | 272 | {BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html", |
bpatel@1686 | 273 | "<pre>void oneException()" + NL + |
jjg@1741 | 274 | " throws <a href=\"../typeannos/ThrB.html\" title=\"" + |
bpatel@1686 | 275 | "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" + |
bpatel@2101 | 276 | "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>" |
bpatel@1686 | 277 | }, |
bpatel@1686 | 278 | {BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html", |
bpatel@1686 | 279 | "<pre>void twoExceptions()" + NL + |
jjg@1741 | 280 | " throws <a href=\"../typeannos/ThrB.html\" title=\"" + |
bpatel@1686 | 281 | "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" + |
bpatel@2101 | 282 | "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException," + NL + |
jjg@1741 | 283 | " <a href=\"../typeannos/ThrA.html\" title=\"" + |
bpatel@1686 | 284 | "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" |
bpatel@1686 | 285 | }, |
bpatel@1686 | 286 | |
bpatel@1691 | 287 | // Test for type annotations on type parameters (TypeParameters.java). |
bpatel@1691 | 288 | {BUG_ID + FS + "typeannos" + FS + "TestMethods.html", |
bpatel@1691 | 289 | "<pre><K,V extends <a href=\"../typeannos/TyParaA.html\" title=\"" + |
bpatel@1691 | 290 | "annotation in typeannos\">@TyParaA</a> java.lang.String> " + |
bpatel@1691 | 291 | "void secondAnnotated()</pre>" |
bpatel@1691 | 292 | }, |
bpatel@1691 | 293 | |
bpatel@1686 | 294 | // Test for type annotations on wildcard type (Wildcards.java). |
bpatel@1686 | 295 | {BUG_ID + FS + "typeannos" + FS + "BoundTest.html", |
bpatel@1686 | 296 | "<pre>void wcExtends(<a href=\"../typeannos/MyList.html\" " + |
bpatel@1686 | 297 | "title=\"class in typeannos\">MyList</a><? extends <a href=\"" + |
bpatel@1686 | 298 | "../typeannos/WldA.html\" title=\"annotation in typeannos\">@WldA" + |
bpatel@1686 | 299 | "</a> java.lang.String> l)</pre>" |
bpatel@1686 | 300 | }, |
bpatel@1686 | 301 | {BUG_ID + FS + "typeannos" + FS + "BoundTest.html", |
bpatel@1686 | 302 | "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " + |
bpatel@1686 | 303 | "typeannos\">MyList</a><? super <a href=\"../typeannos/WldA.html\" " + |
bpatel@1686 | 304 | "title=\"annotation in typeannos\">@WldA</a> java.lang.String>" + |
bpatel@1686 | 305 | " returnWcSuper()</pre>" |
bpatel@1686 | 306 | }, |
bpatel@1686 | 307 | {BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html", |
bpatel@1686 | 308 | "<pre>void wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" + |
bpatel@1686 | 309 | "class in typeannos\">MyList</a><? super <a href=\"../typeannos/" + |
bpatel@1686 | 310 | "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"" + |
bpatel@2101 | 311 | "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang." + |
bpatel@1686 | 312 | "String> l)</pre>" |
bpatel@1686 | 313 | }, |
bpatel@1686 | 314 | {BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html", |
bpatel@1686 | 315 | "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " + |
bpatel@1686 | 316 | "typeannos\">MyList</a><? extends <a href=\"../typeannos/WldB." + |
bpatel@1686 | 317 | "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../" + |
bpatel@2101 | 318 | "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String" + |
bpatel@1686 | 319 | "> returnWcExtends()</pre>" |
bpatel@1686 | 320 | }, |
bpatel@1686 | 321 | |
bpatel@1686 | 322 | // Test for receiver annotations (Receivers.java). |
bpatel@1686 | 323 | {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html", |
bpatel@1686 | 324 | "<pre>void withException(<a href=\"../typeannos/RcvrA.html\" " + |
bpatel@1686 | 325 | "title=\"annotation in typeannos\">@RcvrA</a> " + |
jjg@1741 | 326 | "DefaultUnmodified this)" + NL + " throws java." + |
bpatel@1686 | 327 | "lang.Exception</pre>" |
bpatel@1686 | 328 | }, |
bpatel@1686 | 329 | {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html", |
bpatel@1686 | 330 | "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrA." + |
bpatel@1686 | 331 | "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../" + |
bpatel@1686 | 332 | "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" + |
bpatel@2101 | 333 | "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")" + |
bpatel@1686 | 334 | " DefaultUnmodified this)</pre>" |
bpatel@1686 | 335 | }, |
bpatel@1686 | 336 | {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html", |
bpatel@1686 | 337 | "<pre><T extends java.lang.Runnable> void accept(" + |
bpatel@1686 | 338 | "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in " + |
bpatel@1686 | 339 | "typeannos\">@RcvrA</a> DefaultUnmodified this," + NL + |
jjg@1741 | 340 | " T r)" + NL + |
jjg@1741 | 341 | " throws java.lang.Exception</pre>" |
bpatel@1686 | 342 | }, |
bpatel@1686 | 343 | {BUG_ID + FS + "typeannos" + FS + "PublicModified.html", |
bpatel@1686 | 344 | "<pre>public final java.lang.String nonVoid(<a href=\"" + |
bpatel@1686 | 345 | "../typeannos/RcvrA.html\" title=\"annotation in typeannos\">" + |
bpatel@1686 | 346 | "@RcvrA</a> PublicModified this)</pre>" |
bpatel@1686 | 347 | }, |
bpatel@1686 | 348 | {BUG_ID + FS + "typeannos" + FS + "PublicModified.html", |
bpatel@1686 | 349 | "<pre>public final <T extends java.lang.Runnable> " + |
bpatel@1686 | 350 | "void accept(<a href=\"../typeannos/RcvrA.html\" title=\"" + |
bpatel@1686 | 351 | "annotation in typeannos\">@RcvrA</a> PublicModified this," + NL + |
jjg@1741 | 352 | " T r)" + NL + |
jjg@1741 | 353 | " throws java.lang.Exception</pre>" |
bpatel@1686 | 354 | }, |
bpatel@1686 | 355 | {BUG_ID + FS + "typeannos" + FS + "WithValue.html", |
bpatel@1686 | 356 | "<pre><T extends java.lang.Runnable> void accept(" + |
bpatel@1686 | 357 | "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in " + |
bpatel@2101 | 358 | "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">" + |
bpatel@1686 | 359 | "value</a>=\"m\") WithValue this," + NL + |
jjg@1741 | 360 | " T r)" + NL + |
jjg@1741 | 361 | " throws java.lang.Exception</pre>" |
bpatel@1686 | 362 | }, |
bpatel@1686 | 363 | {BUG_ID + FS + "typeannos" + FS + "WithFinal.html", |
bpatel@1686 | 364 | "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrB." + |
bpatel@1686 | 365 | "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../" + |
bpatel@2101 | 366 | "typeannos/RcvrB.html#value--\">value</a>=\"m\") WithFinal" + |
bpatel@1686 | 367 | " this)</pre>" |
bpatel@1686 | 368 | }, |
bpatel@1686 | 369 | {BUG_ID + FS + "typeannos" + FS + "WithBody.html", |
bpatel@1686 | 370 | "<pre>void field(<a href=\"../typeannos/RcvrA.html\" title=\"" + |
bpatel@1686 | 371 | "annotation in typeannos\">@RcvrA</a> WithBody this)</pre>" |
bpatel@1686 | 372 | }, |
bpatel@1686 | 373 | {BUG_ID + FS + "typeannos" + FS + "Generic2.html", |
bpatel@1686 | 374 | "<pre>void test2(<a href=\"../typeannos/RcvrA.html\" title=\"" + |
bpatel@1686 | 375 | "annotation in typeannos\">@RcvrA</a> Generic2<X> this)</pre>" |
bpatel@1686 | 376 | } |
bpatel@1686 | 377 | }; |
bpatel@1686 | 378 | |
bpatel@1686 | 379 | /** |
bpatel@1686 | 380 | * The entry point of the test. |
bpatel@1686 | 381 | * @param args the array of command line arguments. |
bpatel@1686 | 382 | */ |
bpatel@1686 | 383 | public static void main(String[] args) { |
bpatel@1686 | 384 | TestTypeAnnotations tester = new TestTypeAnnotations(); |
bpatel@1686 | 385 | run(tester, ARGS, TEST, NEGATED_TEST); |
bpatel@1686 | 386 | tester.printSummary(); |
bpatel@1686 | 387 | } |
bpatel@1686 | 388 | |
bpatel@1686 | 389 | /** |
bpatel@1686 | 390 | * {@inheritDoc} |
bpatel@1686 | 391 | */ |
bpatel@1686 | 392 | public String getBugId() { |
bpatel@1686 | 393 | return BUG_ID; |
bpatel@1686 | 394 | } |
bpatel@1686 | 395 | |
bpatel@1686 | 396 | /** |
bpatel@1686 | 397 | * {@inheritDoc} |
bpatel@1686 | 398 | */ |
bpatel@1686 | 399 | public String getBugName() { |
bpatel@1686 | 400 | return getClass().getName(); |
bpatel@1686 | 401 | } |
bpatel@1686 | 402 | } |