1 /******************************************************************************* 2 * Copyright (c) 2000, 2009 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.jdt.core.tests.model; 15 16 import junit.framework.Test; 17 18 import org.eclipse.core.runtime.*; 19 import org.eclipse.jdt.core.*; 20 import org.eclipse.jdt.core.search.*; 21 22 /** 23 * Test for generic constructor search using R_ERASURE_MATCH rule. 24 */ 25 public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGenericTests { 26 JavaSearchGenericConstructorTests(String name)27 public JavaSearchGenericConstructorTests(String name) { 28 super(name, ERASURE_RULE); 29 } 30 // defined for sub-classes JavaSearchGenericConstructorTests(String name, int matchRule)31 JavaSearchGenericConstructorTests(String name, int matchRule) { 32 super(name, matchRule); 33 } suite()34 public static Test suite() { 35 return buildModelTestSuite(JavaSearchGenericConstructorTests.class); 36 } 37 // Use this static initializer to specify subset for tests 38 // All specified tests which do not belong to the class are skipped... 39 static { 40 // TESTS_PREFIX = "testConstructorDeclarations"; 41 // TESTS_NAMES = new String[] { "testConstructorStringPatternSingleParamArguments06" }; 42 // TESTS_NUMBERS = new int[] { 8 }; 43 // TESTS_RANGE = new int[] { -1, -1 }; 44 } 45 46 /* 47 * Remove last type arguments from a line of an expected result. 48 * This line contains one search match print out. 49 */ removeFirstTypeArgument(char[] line)50 long removeFirstTypeArgument(char[] line) { 51 int idx=0; 52 int length = line.length; 53 while (line[idx++] != '[') { 54 if (idx == length) return -1; 55 } 56 if (line[idx++] != '<') return -1; 57 int start = idx; 58 int n = 1; 59 while(idx < length && n!= 0) { 60 switch (line[idx++]) { 61 case '<': n++; break; 62 case '>': n--; break; 63 } 64 } 65 if (n!= 0) { 66 // something wrong here... 67 return -1; 68 } 69 return ((long)start<<32) + idx; 70 } 71 72 @Override addResultLine(StringBuffer buffer, char[] line)73 void addResultLine(StringBuffer buffer, char[] line) { 74 long positions = removeFirstTypeArgument(line); 75 if (buffer.length() > 0) buffer.append('\n'); 76 if (positions != -1) { 77 int stop = (int) (positions >>> 32) - 1; 78 int restart = (int) positions; 79 buffer.append(line, 0, stop); 80 buffer.append(line, restart, line.length-restart); 81 } else { 82 buffer.append(line); 83 } 84 } 85 86 /** 87 * Bug 75642: [1.5][search] Methods and constructor search does not work with generics 88 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=75642" 89 */ 90 /* 91 * REFERENCES 92 */ 93 // Search references to constructors defined in a single type parameter class testConstructorReferencesElementPatternSingleTypeParameter01()94 public void testConstructorReferencesElementPatternSingleTypeParameter01() throws CoreException { 95 IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.java").getType("Single"); 96 // search reference to a standard constructor 97 IMethod method = type.getMethod("Single", new String[] { "QT;" }); 98 IJavaSearchScope scope = getJavaSearchScope15(); 99 search(method, REFERENCES, scope, this.resultCollector); 100 assertSearchResults( 101 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object())] ERASURE_RAW_MATCH\n" + 102 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(new Object())] ERASURE_MATCH\n" + 103 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] ERASURE_MATCH\n" + 104 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(new RuntimeException())] ERASURE_MATCH" 105 ); 106 } testConstructorReferencesElementPatternSingleTypeParameter02()107 public void testConstructorReferencesElementPatternSingleTypeParameter02() throws CoreException { 108 IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.java").getType("Single"); 109 // search reference to a generic constructor 110 IMethod method = type.getMethod("Single", new String[] { "QT;", "QU;" }); 111 IJavaSearchScope scope = getJavaSearchScope15(); 112 search(method, REFERENCES, scope, this.resultCollector); 113 assertSearchResults( 114 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), new Throwable())] ERASURE_RAW_MATCH\n" + 115 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Throwable>Single<Object>(new Object(), new Throwable())] ERASURE_MATCH\n" + 116 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), new Exception())] ERASURE_MATCH\n" + 117 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), new RuntimeException())] ERASURE_MATCH" 118 ); 119 } testConstructorReferencesElementPatternSingleTypeParameter03()120 public void testConstructorReferencesElementPatternSingleTypeParameter03() throws CoreException { 121 IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.java").getType("Single"); 122 // search reference to a method with parameterized type arguments 123 IMethod method = type.getMethod("Single", new String[] { "QSingle<QT;>;" }); 124 IJavaSearchScope scope = getJavaSearchScope15(); 125 search(method, REFERENCES, scope, this.resultCollector); 126 assertSearchResults( 127 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(gs)] ERASURE_RAW_MATCH\n" + 128 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(gs)] ERASURE_MATCH\n" + 129 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(gs)] ERASURE_MATCH\n" + 130 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(gs)] ERASURE_MATCH" 131 ); 132 } testConstructorReferencesElementPatternSingleTypeParameter04()133 public void testConstructorReferencesElementPatternSingleTypeParameter04() throws CoreException { 134 IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.java").getType("Single"); 135 // search reference to a generic method returning a param type with param type parameters (=complete) 136 IMethod method = type.getMethod("Single", new String[] { "QU;", "QSingle<QT;>;" }); 137 IJavaSearchScope scope = getJavaSearchScope15(); 138 search(method, REFERENCES, scope, this.resultCollector); 139 assertSearchResults( 140 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), gs)] ERASURE_RAW_MATCH\n" + 141 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] ERASURE_MATCH\n" + 142 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] ERASURE_MATCH\n" + 143 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), gs)] ERASURE_MATCH" 144 ); 145 } 146 147 // Search references to contructors defined in a multiple type parameters class testConstructorReferencesElementPatternMultipleTypeParameter01()148 public void testConstructorReferencesElementPatternMultipleTypeParameter01() throws CoreException { 149 IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.java").getType("Multiple"); 150 IMethod method = type.getMethod("Multiple", new String[] { "QT1;","QT2;","QT3;" }); 151 IJavaSearchScope scope = getJavaSearchScope15(); 152 search(method, REFERENCES, scope, this.resultCollector); 153 assertSearchResults( 154 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(new Object(), new Object(), new Object())] ERASURE_MATCH\n" + 155 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] ERASURE_MATCH\n" + 156 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(), new RuntimeException(), new RuntimeException())] ERASURE_MATCH\n" + 157 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Object(), new Object())] ERASURE_RAW_MATCH" 158 ); 159 } testConstructorReferencesElementPatternMultipleTypeParameter02()160 public void testConstructorReferencesElementPatternMultipleTypeParameter02() throws CoreException { 161 IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.java").getType("Multiple"); 162 IMethod method = type.getMethod("Multiple", new String[] { "QMultiple<QT1;QT2;QT3;>;", "QU1;","QU2;","QU3;" }); 163 IJavaSearchScope scope = getJavaSearchScope15(); 164 search(method, REFERENCES, scope, this.resultCollector); 165 assertSearchResults( 166 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(gm, new Object(), new Throwable(), new Exception())] ERASURE_MATCH\n" + 167 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(gm, new Exception(),new Exception(),new Exception())] ERASURE_MATCH\n" + 168 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(gm, new RuntimeException(),new RuntimeException(),new RuntimeException())] ERASURE_MATCH\n" + 169 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm, new Object(), new Throwable(), new Exception())] ERASURE_RAW_MATCH" 170 ); 171 } testConstructorReferencesElementPatternMultipleTypeParameter03()172 public void testConstructorReferencesElementPatternMultipleTypeParameter03() throws CoreException { 173 IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.java").getType("Multiple"); 174 IMethod method = type.getMethod("Multiple", new String[] { "QMultiple<QT1;QT2;QT3;>;" }); 175 IJavaSearchScope scope = getJavaSearchScope15(); 176 search(method, REFERENCES, scope, this.resultCollector); 177 assertSearchResults( 178 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(gm)] ERASURE_MATCH\n" + 179 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(gm)] ERASURE_MATCH\n" + 180 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(gm)] ERASURE_MATCH\n" + 181 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm)] ERASURE_RAW_MATCH" 182 ); 183 } testConstructorReferencesElementPatternMultipleTypeParameter04()184 public void testConstructorReferencesElementPatternMultipleTypeParameter04() throws CoreException { 185 IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.java").getType("Multiple"); 186 IMethod method = type.getMethod("Multiple", new String[] { "QU1;","QU2;","QU3;", "QMultiple<QT1;QT2;QT3;>;" }); 187 IJavaSearchScope scope = getJavaSearchScope15(); 188 search(method, REFERENCES, scope, this.resultCollector); 189 assertSearchResults( 190 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(new Object(), new Throwable(), new Exception(), gm)] ERASURE_MATCH\n" + 191 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(new Exception(),new Exception(),new Exception(), gm)] ERASURE_MATCH\n" + 192 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm)] ERASURE_MATCH\n" + 193 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Throwable(), new Exception(), gm)] ERASURE_RAW_MATCH" 194 ); 195 } 196 197 // Search references to single parameterized contructors testConstructorReferencesElementPatternSingleParamArguments01()198 public void testConstructorReferencesElementPatternSingleParamArguments01() throws CoreException { 199 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java"); 200 IMethod method = selectMethod(unit, "Single", 9); 201 IJavaSearchScope scope = getJavaSearchScope15(); 202 search(method, REFERENCES, scope, this.resultCollector); 203 assertSearchResults( 204 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object())] EQUIVALENT_RAW_MATCH\n" + 205 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(new Object())] ERASURE_MATCH\n" + 206 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EXACT_MATCH\n" + 207 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(new RuntimeException())] ERASURE_MATCH" 208 ); 209 } testConstructorReferencesElementPatternSingleParamArguments02()210 public void testConstructorReferencesElementPatternSingleParamArguments02() throws CoreException { 211 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java"); 212 IMethod method = selectMethod(unit, "Single", 10); 213 IJavaSearchScope scope = getJavaSearchScope15(); 214 search(method, REFERENCES, scope, this.resultCollector); 215 assertSearchResults( 216 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), new Throwable())] EQUIVALENT_RAW_MATCH\n" + 217 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Throwable>Single<Object>(new Object(), new Throwable())] ERASURE_MATCH\n" + 218 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), new Exception())] EXACT_MATCH\n" + 219 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), new RuntimeException())] ERASURE_MATCH" 220 ); 221 } testConstructorReferencesElementPatternSingleParamArguments03()222 public void testConstructorReferencesElementPatternSingleParamArguments03() throws CoreException { 223 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java"); 224 IMethod method = selectMethod(unit, "Single", 11); 225 IJavaSearchScope scope = getJavaSearchScope15(); 226 search(method, REFERENCES, scope, this.resultCollector); 227 assertSearchResults( 228 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(gs)] EQUIVALENT_RAW_MATCH\n" + 229 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(gs)] ERASURE_MATCH\n" + 230 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(gs)] EXACT_MATCH\n" + 231 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(gs)] ERASURE_MATCH" 232 ); 233 } testConstructorReferencesElementPatternSingleParamArguments04()234 public void testConstructorReferencesElementPatternSingleParamArguments04() throws CoreException { 235 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java"); 236 IMethod method = selectMethod(unit, "Single", 12); 237 IJavaSearchScope scope = getJavaSearchScope15(); 238 search(method, REFERENCES, scope, this.resultCollector); 239 assertSearchResults( 240 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), gs)] EQUIVALENT_RAW_MATCH\n" + 241 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] ERASURE_MATCH\n" + 242 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] EXACT_MATCH\n" + 243 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), gs)] ERASURE_MATCH" 244 ); 245 } testConstructorReferencesElementPatternSingleParamArguments05()246 public void testConstructorReferencesElementPatternSingleParamArguments05() throws CoreException { 247 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java"); 248 IMethod method = selectMethod(unit, "Single", 5); 249 IJavaSearchScope scope = getJavaSearchScope15(); 250 search(method, REFERENCES, scope, this.resultCollector); 251 assertSearchResults( 252 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), new Throwable())] EXACT_RAW_MATCH\n" + 253 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Throwable>Single<Object>(new Object(), new Throwable())] EQUIVALENT_MATCH\n" + 254 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), new Exception())] EQUIVALENT_MATCH\n" + 255 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), new RuntimeException())] EQUIVALENT_MATCH" 256 ); 257 } testConstructorReferencesElementPatternSingleParamArguments06()258 public void testConstructorReferencesElementPatternSingleParamArguments06() throws CoreException { 259 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java"); 260 IMethod method = selectMethod(unit, "Single", 7); 261 IJavaSearchScope scope = getJavaSearchScope15(); 262 search(method, REFERENCES, scope, this.resultCollector); 263 assertSearchResults( 264 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), gs)] EXACT_RAW_MATCH\n" + 265 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] EQUIVALENT_MATCH\n" + 266 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] EQUIVALENT_MATCH\n" + 267 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), gs)] EQUIVALENT_MATCH" 268 ); 269 } 270 271 // Search references to multiple parameterized contructors testConstructorReferencesElementPatternMultipleParamArguments01()272 public void testConstructorReferencesElementPatternMultipleParamArguments01() throws CoreException { 273 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java"); 274 IMethod method = selectMethod(unit, "Multiple", 8); 275 IJavaSearchScope scope = getJavaSearchScope15(); 276 search(method, REFERENCES, scope, this.resultCollector); 277 assertSearchResults( 278 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(new Object(), new Object(), new Object())] ERASURE_MATCH\n" + 279 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] EXACT_MATCH\n" + 280 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(), new RuntimeException(), new RuntimeException())] ERASURE_MATCH\n" + 281 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Object(), new Object())] EQUIVALENT_RAW_MATCH" 282 ); 283 } testConstructorReferencesElementPatternMultipleParamArguments02()284 public void testConstructorReferencesElementPatternMultipleParamArguments02() throws CoreException { 285 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java"); 286 IMethod method = selectMethod(unit, "Multiple", 9); 287 IJavaSearchScope scope = getJavaSearchScope15(); 288 search(method, REFERENCES, scope, this.resultCollector); 289 assertSearchResults( 290 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(gm, new Object(), new Throwable(), new Exception())] ERASURE_MATCH\n" + 291 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(gm, new Exception(),new Exception(),new Exception())] EXACT_MATCH\n" + 292 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(gm, new RuntimeException(),new RuntimeException(),new RuntimeException())] ERASURE_MATCH\n" + 293 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm, new Object(), new Throwable(), new Exception())] EQUIVALENT_RAW_MATCH" 294 ); 295 } testConstructorReferencesElementPatternMultipleParamArguments03()296 public void testConstructorReferencesElementPatternMultipleParamArguments03() throws CoreException { 297 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java"); 298 IMethod method = selectMethod(unit, "Multiple", 10); 299 IJavaSearchScope scope = getJavaSearchScope15(); 300 search(method, REFERENCES, scope, this.resultCollector); 301 assertSearchResults( 302 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(gm)] ERASURE_MATCH\n" + 303 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(gm)] EXACT_MATCH\n" + 304 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(gm)] ERASURE_MATCH\n" + 305 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm)] EQUIVALENT_RAW_MATCH" 306 ); 307 } testConstructorReferencesElementPatternMultipleParamArguments04()308 public void testConstructorReferencesElementPatternMultipleParamArguments04() throws CoreException { 309 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java"); 310 IMethod method = selectMethod(unit, "Multiple", 11); 311 IJavaSearchScope scope = getJavaSearchScope15(); 312 search(method, REFERENCES, scope, this.resultCollector); 313 assertSearchResults( 314 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(new Object(), new Throwable(), new Exception(), gm)] ERASURE_MATCH\n" + 315 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(new Exception(),new Exception(),new Exception(), gm)] EXACT_MATCH\n" + 316 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm)] ERASURE_MATCH\n" + 317 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Throwable(), new Exception(), gm)] EQUIVALENT_RAW_MATCH" 318 ); 319 } testConstructorReferencesElementPatternMultipleParamArguments05()320 public void testConstructorReferencesElementPatternMultipleParamArguments05() throws CoreException { 321 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java"); 322 IMethod method = selectMethod(unit, "Multiple", 5); 323 IJavaSearchScope scope = getJavaSearchScope15(); 324 search(method, REFERENCES, scope, this.resultCollector); 325 assertSearchResults( 326 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(gm, new Object(), new Throwable(), new Exception())] EQUIVALENT_MATCH\n" + 327 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(gm, new Exception(),new Exception(),new Exception())] EQUIVALENT_MATCH\n" + 328 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(gm, new RuntimeException(),new RuntimeException(),new RuntimeException())] EQUIVALENT_MATCH\n" + 329 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm, new Object(), new Throwable(), new Exception())] EXACT_RAW_MATCH" 330 ); 331 } testConstructorReferencesElementPatternMultipleParamArguments06()332 public void testConstructorReferencesElementPatternMultipleParamArguments06() throws CoreException { 333 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java"); 334 IMethod method = selectMethod(unit, "Multiple", 7); 335 IJavaSearchScope scope = getJavaSearchScope15(); 336 search(method, REFERENCES, scope, this.resultCollector); 337 assertSearchResults( 338 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(new Object(), new Throwable(), new Exception(), gm)] EQUIVALENT_MATCH\n" + 339 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(new Exception(),new Exception(),new Exception(), gm)] EQUIVALENT_MATCH\n" + 340 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm)] EQUIVALENT_MATCH\n" + 341 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Throwable(), new Exception(), gm)] EXACT_RAW_MATCH" 342 ); 343 } 344 345 // Search string pattern references to single parameterized contructors testConstructorReferencesStringPatternSingleParamArguments01()346 public void testConstructorReferencesStringPatternSingleParamArguments01() throws CoreException { 347 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 348 search("<Exception>Single", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 349 assertSearchResults( 350 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object())] EQUIVALENT_RAW_MATCH\n" + 351 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), new Throwable())] EQUIVALENT_RAW_MATCH\n" + 352 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(gs)] EQUIVALENT_RAW_MATCH\n" + 353 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), gs)] EQUIVALENT_RAW_MATCH\n" + 354 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(new Object())] ERASURE_MATCH\n" + 355 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Throwable>Single<Object>(new Object(), new Throwable())] ERASURE_MATCH\n" + 356 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(gs)] ERASURE_MATCH\n" + 357 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] EXACT_MATCH\n" + 358 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EXACT_MATCH\n" + 359 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), new Exception())] EXACT_MATCH\n" + 360 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(gs)] EXACT_MATCH\n" + 361 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] EXACT_MATCH\n" + 362 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(new RuntimeException())] ERASURE_MATCH\n" + 363 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), new RuntimeException())] ERASURE_MATCH\n" + 364 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(gs)] ERASURE_MATCH\n" + 365 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), gs)] ERASURE_MATCH" 366 ); 367 } testConstructorReferencesStringPatternSingleParamArguments02()368 public void testConstructorReferencesStringPatternSingleParamArguments02() throws CoreException { 369 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 370 search("<? extends Exception> Single", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 371 assertSearchResults( 372 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object())] EQUIVALENT_RAW_MATCH\n" + 373 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), new Throwable())] EQUIVALENT_RAW_MATCH\n" + 374 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(gs)] EQUIVALENT_RAW_MATCH\n" + 375 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), gs)] EQUIVALENT_RAW_MATCH\n" + 376 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(new Object())] ERASURE_MATCH\n" + 377 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Throwable>Single<Object>(new Object(), new Throwable())] ERASURE_MATCH\n" + 378 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(gs)] ERASURE_MATCH\n" + 379 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] EQUIVALENT_MATCH\n" + 380 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EQUIVALENT_MATCH\n" + 381 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), new Exception())] EQUIVALENT_MATCH\n" + 382 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(gs)] EQUIVALENT_MATCH\n" + 383 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] EQUIVALENT_MATCH\n" + 384 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(new RuntimeException())] EQUIVALENT_MATCH\n" + 385 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), new RuntimeException())] EQUIVALENT_MATCH\n" + 386 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(gs)] EQUIVALENT_MATCH\n" + 387 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), gs)] EQUIVALENT_MATCH" 388 ); 389 } testConstructorReferencesStringPatternSingleParamArguments03()390 public void testConstructorReferencesStringPatternSingleParamArguments03() throws CoreException { 391 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 392 search("<? super Exception>S?ng*", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 393 assertSearchResults( 394 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object())] EQUIVALENT_RAW_MATCH\n" + 395 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), new Throwable())] EQUIVALENT_RAW_MATCH\n" + 396 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(gs)] EQUIVALENT_RAW_MATCH\n" + 397 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), gs)] EQUIVALENT_RAW_MATCH\n" + 398 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(new Object())] EQUIVALENT_MATCH\n" + 399 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Throwable>Single<Object>(new Object(), new Throwable())] EQUIVALENT_MATCH\n" + 400 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(gs)] EQUIVALENT_MATCH\n" + 401 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] EQUIVALENT_MATCH\n" + 402 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EQUIVALENT_MATCH\n" + 403 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), new Exception())] EQUIVALENT_MATCH\n" + 404 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(gs)] EQUIVALENT_MATCH\n" + 405 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] EQUIVALENT_MATCH\n" + 406 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(new RuntimeException())] ERASURE_MATCH\n" + 407 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), new RuntimeException())] ERASURE_MATCH\n" + 408 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(gs)] ERASURE_MATCH\n" + 409 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), gs)] ERASURE_MATCH" 410 ); 411 } testConstructorReferencesStringPatternSingleParamArguments04()412 public void testConstructorReferencesStringPatternSingleParamArguments04() throws CoreException { 413 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 414 search("Single", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 415 assertSearchResults( 416 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object())] EXACT_RAW_MATCH\n" + 417 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), new Throwable())] EXACT_RAW_MATCH\n" + 418 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(gs)] EXACT_RAW_MATCH\n" + 419 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), gs)] EXACT_RAW_MATCH\n" + 420 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(new Object())] EQUIVALENT_MATCH\n" + 421 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Throwable>Single<Object>(new Object(), new Throwable())] EQUIVALENT_MATCH\n" + 422 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(gs)] EQUIVALENT_MATCH\n" + 423 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] EQUIVALENT_MATCH\n" + 424 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EQUIVALENT_MATCH\n" + 425 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), new Exception())] EQUIVALENT_MATCH\n" + 426 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(gs)] EQUIVALENT_MATCH\n" + 427 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] EQUIVALENT_MATCH\n" + 428 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(new RuntimeException())] EQUIVALENT_MATCH\n" + 429 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), new RuntimeException())] EQUIVALENT_MATCH\n" + 430 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(gs)] EQUIVALENT_MATCH\n" + 431 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), gs)] EQUIVALENT_MATCH" 432 ); 433 } testConstructorReferencesStringPatternSingleParamArguments05()434 public void testConstructorReferencesStringPatternSingleParamArguments05() throws CoreException { 435 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 436 search("Single(Object)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 437 assertSearchResults( 438 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object())] EXACT_RAW_MATCH\n" + 439 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(new Object())] EQUIVALENT_MATCH" 440 ); 441 } testConstructorReferencesStringPatternSingleParamArguments06()442 public void testConstructorReferencesStringPatternSingleParamArguments06() throws CoreException { 443 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 444 search("Single(Exception, Single<Exception>)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 445 assertSearchResults( 446 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] EQUIVALENT_MATCH\n" + 447 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] EQUIVALENT_MATCH" 448 ); 449 } testConstructorReferencesStringPatternSingleParamArguments07()450 public void testConstructorReferencesStringPatternSingleParamArguments07() throws CoreException { 451 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 452 search("Single<Exception>", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 453 assertSearchResults( 454 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object())] EQUIVALENT_RAW_MATCH\n" + 455 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), new Throwable())] EQUIVALENT_RAW_MATCH\n" + 456 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(gs)] EQUIVALENT_RAW_MATCH\n" + 457 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testSingle() [new Single(new Object(), gs)] EQUIVALENT_RAW_MATCH\n" + 458 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(new Object())] ERASURE_MATCH\n" + 459 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Throwable>Single<Object>(new Object(), new Throwable())] ERASURE_MATCH\n" + 460 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new Single<Object>(gs)] ERASURE_MATCH\n" + 461 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] ERASURE_MATCH\n" + 462 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EXACT_MATCH\n" + 463 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), new Exception())] EXACT_MATCH\n" + 464 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(gs)] EXACT_MATCH\n" + 465 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] EXACT_MATCH\n" + 466 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(new RuntimeException())] ERASURE_MATCH\n" + 467 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), new RuntimeException())] ERASURE_MATCH\n" + 468 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new Single<RuntimeException>(gs)] ERASURE_MATCH\n" + 469 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testRuntimeException() [new <RuntimeException>Single<RuntimeException>(new RuntimeException(), gs)] ERASURE_MATCH" 470 ); 471 } testConstructorReferencesStringPatternSingleParamArguments08()472 public void testConstructorReferencesStringPatternSingleParamArguments08() throws CoreException { 473 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 474 search("Single<Exception>(Exception)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 475 assertSearchResults( 476 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EXACT_MATCH" 477 ); 478 } testConstructorReferencesStringPatternSingleParamArguments09()479 public void testConstructorReferencesStringPatternSingleParamArguments09() throws CoreException { 480 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 481 search("Single<? extends Exception>(Exception, Single<? super Exception>)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 482 assertSearchResults( 483 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testObject() [new <Exception>Single<Object>(new Exception(), gs)] ERASURE_MATCH\n" + 484 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new <Exception>Single<Exception>(new Exception(), gs)] EQUIVALENT_MATCH" 485 ); 486 } testConstructorReferencesStringPatternSingleParamArguments10()487 public void testConstructorReferencesStringPatternSingleParamArguments10() throws CoreException { 488 IJavaSearchScope scope = getJavaSearchScope15(); 489 search("<Exception>Single(Exception)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 490 assertSearchResults( 491 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EXACT_MATCH" 492 ); 493 } testConstructorReferencesStringPatternSingleParamArguments11()494 public void testConstructorReferencesStringPatternSingleParamArguments11() throws CoreException { 495 IJavaSearchScope scope = getJavaSearchScope15(); 496 search("g5.c.def.Single<Exception>(Exception)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 497 assertSearchResults( 498 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EXACT_MATCH" 499 ); 500 } testConstructorReferencesStringPatternSingleParamArguments12()501 public void testConstructorReferencesStringPatternSingleParamArguments12() throws CoreException { 502 IJavaSearchScope scope = getJavaSearchScope15(); 503 search("g5.c.def.<? extends Exception>Single<? extends Exception>(Exception)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 504 assertSearchResults( 505 "src/g5/c/ref/RefSingle.java void g5.c.ref.RefSingle.testException() [new Single<Exception>(new Exception())] EQUIVALENT_MATCH" 506 ); 507 } 508 509 // Search string pattern references to multiple parameterized contructors testConstructorReferencesStringPatternMultipleParamArguments01()510 public void testConstructorReferencesStringPatternMultipleParamArguments01() throws CoreException { 511 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 512 search("<?, ? extends Exception, ? super RuntimeException>Multiple", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 513 assertSearchResults( 514 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(new Object(), new Object(), new Object())] ERASURE_MATCH\n" + 515 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(gm, new Object(), new Throwable(), new Exception())] ERASURE_MATCH\n" + 516 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(gm)] ERASURE_MATCH\n" + 517 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(new Object(), new Throwable(), new Exception(), gm)] ERASURE_MATCH\n" + 518 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] EQUIVALENT_MATCH\n" + 519 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(gm, new Exception(),new Exception(),new Exception())] EQUIVALENT_MATCH\n" + 520 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(gm)] EQUIVALENT_MATCH\n" + 521 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(new Exception(),new Exception(),new Exception(), gm)] EQUIVALENT_MATCH\n" + 522 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(), new RuntimeException(), new RuntimeException())] EQUIVALENT_MATCH\n" + 523 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(gm, new RuntimeException(),new RuntimeException(),new RuntimeException())] EQUIVALENT_MATCH\n" + 524 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(gm)] EQUIVALENT_MATCH\n" + 525 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm)] EQUIVALENT_MATCH\n" + 526 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Object(), new Object())] EQUIVALENT_RAW_MATCH\n" + 527 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm, new Object(), new Throwable(), new Exception())] EQUIVALENT_RAW_MATCH\n" + 528 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm)] EQUIVALENT_RAW_MATCH\n" + 529 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Throwable(), new Exception(), gm)] EQUIVALENT_RAW_MATCH" 530 ); 531 } testConstructorReferencesStringPatternMultipleParamArguments02()532 public void testConstructorReferencesStringPatternMultipleParamArguments02() throws CoreException { 533 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 534 search("<Object, Exception, RuntimeException>Multiple", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 535 assertSearchResults( 536 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(new Object(), new Object(), new Object())] ERASURE_MATCH\n" + 537 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(gm, new Object(), new Throwable(), new Exception())] ERASURE_MATCH\n" + 538 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(gm)] ERASURE_MATCH\n" + 539 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(new Object(), new Throwable(), new Exception(), gm)] ERASURE_MATCH\n" + 540 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] ERASURE_MATCH\n" + 541 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(gm, new Exception(),new Exception(),new Exception())] ERASURE_MATCH\n" + 542 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(gm)] ERASURE_MATCH\n" + 543 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(new Exception(),new Exception(),new Exception(), gm)] ERASURE_MATCH\n" + 544 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(), new RuntimeException(), new RuntimeException())] ERASURE_MATCH\n" + 545 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(gm, new RuntimeException(),new RuntimeException(),new RuntimeException())] ERASURE_MATCH\n" + 546 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(gm)] ERASURE_MATCH\n" + 547 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm)] ERASURE_MATCH\n" + 548 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Object(), new Object())] EQUIVALENT_RAW_MATCH\n" + 549 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm, new Object(), new Throwable(), new Exception())] EQUIVALENT_RAW_MATCH\n" + 550 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm)] EQUIVALENT_RAW_MATCH\n" + 551 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Throwable(), new Exception(), gm)] EQUIVALENT_RAW_MATCH" 552 ); 553 } testConstructorReferencesStringPatternMultipleParamArguments03()554 public void testConstructorReferencesStringPatternMultipleParamArguments03() throws CoreException { 555 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 556 search("Multiple", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 557 assertSearchResults( 558 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(new Object(), new Object(), new Object())] EQUIVALENT_MATCH\n" + 559 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(gm, new Object(), new Throwable(), new Exception())] EQUIVALENT_MATCH\n" + 560 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(gm)] EQUIVALENT_MATCH\n" + 561 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(new Object(), new Throwable(), new Exception(), gm)] EQUIVALENT_MATCH\n" + 562 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] EQUIVALENT_MATCH\n" + 563 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(gm, new Exception(),new Exception(),new Exception())] EQUIVALENT_MATCH\n" + 564 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(gm)] EQUIVALENT_MATCH\n" + 565 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(new Exception(),new Exception(),new Exception(), gm)] EQUIVALENT_MATCH\n" + 566 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(), new RuntimeException(), new RuntimeException())] EQUIVALENT_MATCH\n" + 567 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(gm, new RuntimeException(),new RuntimeException(),new RuntimeException())] EQUIVALENT_MATCH\n" + 568 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(gm)] EQUIVALENT_MATCH\n" + 569 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm)] EQUIVALENT_MATCH\n" + 570 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Object(), new Object())] EXACT_RAW_MATCH\n" + 571 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm, new Object(), new Throwable(), new Exception())] EXACT_RAW_MATCH\n" + 572 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm)] EXACT_RAW_MATCH\n" + 573 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Throwable(), new Exception(), gm)] EXACT_RAW_MATCH" 574 ); 575 } testConstructorReferencesStringPatternMultipleParamArguments04()576 public void testConstructorReferencesStringPatternMultipleParamArguments04() throws CoreException { 577 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 578 search("Multiple(Exception,Exception,Exception)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 579 assertSearchResults( 580 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] EQUIVALENT_MATCH" 581 ); 582 } testConstructorReferencesStringPatternMultipleParamArguments05()583 public void testConstructorReferencesStringPatternMultipleParamArguments05() throws CoreException { 584 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 585 search("Multiple(RuntimeException,RuntimeException,RuntimeException,Multiple<RuntimeException, RuntimeException, RuntimeException>)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 586 assertSearchResults( 587 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm)] EQUIVALENT_MATCH" 588 ); 589 } testConstructorReferencesStringPatternMultipleParamArguments06()590 public void testConstructorReferencesStringPatternMultipleParamArguments06() throws CoreException { 591 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 592 search("Multiple<RuntimeException, RuntimeException, RuntimeException>", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 593 assertSearchResults( 594 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(new Object(), new Object(), new Object())] ERASURE_MATCH\n" + 595 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(gm, new Object(), new Throwable(), new Exception())] ERASURE_MATCH\n" + 596 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(gm)] ERASURE_MATCH\n" + 597 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(new Object(), new Throwable(), new Exception(), gm)] ERASURE_MATCH\n" + 598 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] ERASURE_MATCH\n" + 599 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(gm, new Exception(),new Exception(),new Exception())] ERASURE_MATCH\n" + 600 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(gm)] ERASURE_MATCH\n" + 601 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(new Exception(),new Exception(),new Exception(), gm)] ERASURE_MATCH\n" + 602 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(), new RuntimeException(), new RuntimeException())] EXACT_MATCH\n" + 603 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(gm, new RuntimeException(),new RuntimeException(),new RuntimeException())] EXACT_MATCH\n" + 604 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(gm)] EXACT_MATCH\n" + 605 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm)] EXACT_MATCH\n" + 606 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Object(), new Object())] EQUIVALENT_RAW_MATCH\n" + 607 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm, new Object(), new Throwable(), new Exception())] EQUIVALENT_RAW_MATCH\n" + 608 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm)] EQUIVALENT_RAW_MATCH\n" + 609 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Throwable(), new Exception(), gm)] EQUIVALENT_RAW_MATCH" 610 ); 611 } testConstructorReferencesStringPatternMultipleParamArguments07()612 public void testConstructorReferencesStringPatternMultipleParamArguments07() throws CoreException { 613 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 614 search("Multiple<?,? extends Throwable,? extends Exception>", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 615 assertSearchResults( 616 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(new Object(), new Object(), new Object())] ERASURE_MATCH\n" + 617 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(gm, new Object(), new Throwable(), new Exception())] ERASURE_MATCH\n" + 618 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(gm)] ERASURE_MATCH\n" + 619 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new <Object, Throwable, Exception>Multiple<Object, Object, Object>(new Object(), new Throwable(), new Exception(), gm)] ERASURE_MATCH\n" + 620 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] EQUIVALENT_MATCH\n" + 621 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(gm, new Exception(),new Exception(),new Exception())] EQUIVALENT_MATCH\n" + 622 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(gm)] EQUIVALENT_MATCH\n" + 623 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(new Exception(),new Exception(),new Exception(), gm)] EQUIVALENT_MATCH\n" + 624 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(), new RuntimeException(), new RuntimeException())] EQUIVALENT_MATCH\n" + 625 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(gm, new RuntimeException(),new RuntimeException(),new RuntimeException())] EQUIVALENT_MATCH\n" + 626 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(gm)] EQUIVALENT_MATCH\n" + 627 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm)] EQUIVALENT_MATCH\n" + 628 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Object(), new Object())] EQUIVALENT_RAW_MATCH\n" + 629 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm, new Object(), new Throwable(), new Exception())] EQUIVALENT_RAW_MATCH\n" + 630 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm)] EQUIVALENT_RAW_MATCH\n" + 631 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Throwable(), new Exception(), gm)] EQUIVALENT_RAW_MATCH" 632 ); 633 } testConstructorReferencesStringPatternMultipleParamArguments08()634 public void testConstructorReferencesStringPatternMultipleParamArguments08() throws CoreException { 635 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 636 search("<RuntimeException, RuntimeException, RuntimeException>Multiple(*,*,*)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 637 assertSearchResults( 638 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(new Object(), new Object(), new Object())] ERASURE_MATCH\n" + 639 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] ERASURE_MATCH\n" + 640 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(), new RuntimeException(), new RuntimeException())] EXACT_MATCH\n" + 641 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(new Object(), new Object(), new Object())] EQUIVALENT_RAW_MATCH" 642 ); 643 } testConstructorReferencesStringPatternMultipleParamArguments09()644 public void testConstructorReferencesStringPatternMultipleParamArguments09() throws CoreException { 645 IJavaSearchScope scope = getJavaSearchScope15("g5.c.ref", false); 646 search("<?,? extends Throwable,? extends RuntimeException>Multiple(*)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 647 assertSearchResults( 648 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testObject() [new Multiple<Object, Object, Object>(gm)] ERASURE_MATCH\n" + 649 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(gm)] ERASURE_MATCH\n" + 650 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testRuntimeException() [new Multiple<RuntimeException, RuntimeException, RuntimeException>(gm)] EQUIVALENT_MATCH\n" + 651 "src/g5/c/ref/RefRaw.java void g5.c.ref.RefRaw.testMultiple() [new Multiple(gm)] EQUIVALENT_RAW_MATCH" 652 ); 653 } testConstructorReferencesStringPatternMultipleParamArguments10()654 public void testConstructorReferencesStringPatternMultipleParamArguments10() throws CoreException { 655 IJavaSearchScope scope = getJavaSearchScope15(); 656 search("<Object,Exception,Exception>Multiple(Exception,Exception,Exception)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 657 assertSearchResults( 658 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] ERASURE_MATCH" 659 ); 660 } testConstructorReferencesStringPatternMultipleParamArguments11()661 public void testConstructorReferencesStringPatternMultipleParamArguments11() throws CoreException { 662 IJavaSearchScope scope = getJavaSearchScope15(); 663 search("g5.c.def.Multiple<Exception,Exception,Exception>(Exception,Exception,Exception)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 664 assertSearchResults( 665 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] EXACT_MATCH" 666 ); 667 } testConstructorReferencesStringPatternMultipleParamArguments12()668 public void testConstructorReferencesStringPatternMultipleParamArguments12() throws CoreException { 669 IJavaSearchScope scope = getJavaSearchScope15(); 670 search("g5.c.def.<?,? extends Throwable,? extends Throwable>Multiple<?,? extends Throwable,? extends Exception>(Exception,Exception,Exception)", CONSTRUCTOR, REFERENCES, scope, this.resultCollector); 671 assertSearchResults( 672 "src/g5/c/ref/RefMultiple.java void g5.c.ref.RefMultiple.testException() [new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception())] EQUIVALENT_MATCH" 673 ); 674 } 675 676 /* 677 * DECLARATIONS 678 */ 679 // Search references to single parameterized contructors testConstructorDeclarationsElementPatternSingleParamArguments01()680 public void testConstructorDeclarationsElementPatternSingleParamArguments01() throws CoreException { 681 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java"); 682 IMethod method = selectMethod(unit, "Single", 9); 683 IJavaSearchScope scope = getJavaSearchScope15(); 684 search(method, DECLARATIONS, scope, this.resultCollector); 685 assertSearchResults( 686 "src/g5/c/def/Single.java g5.c.def.Single(T) [Single] EXACT_MATCH" 687 ); 688 } testConstructorDeclarationsElementPatternSingleParamArguments02()689 public void testConstructorDeclarationsElementPatternSingleParamArguments02() throws CoreException { 690 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java"); 691 IMethod method = selectMethod(unit, "Single", 10); 692 IJavaSearchScope scope = getJavaSearchScope15(); 693 search(method, DECLARATIONS, scope, this.resultCollector); 694 assertSearchResults( 695 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH" 696 ); 697 } testConstructorDeclarationsElementPatternSingleParamArguments03()698 public void testConstructorDeclarationsElementPatternSingleParamArguments03() throws CoreException { 699 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java"); 700 IMethod method = selectMethod(unit, "Single", 11); 701 IJavaSearchScope scope = getJavaSearchScope15(); 702 search(method, DECLARATIONS, scope, this.resultCollector); 703 assertSearchResults( 704 "src/g5/c/def/Single.java g5.c.def.Single(Single<T>) [Single] EXACT_MATCH" 705 ); 706 } testConstructorDeclarationsElementPatternSingleParamArguments04()707 public void testConstructorDeclarationsElementPatternSingleParamArguments04() throws CoreException { 708 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java"); 709 IMethod method = selectMethod(unit, "Single", 12); 710 IJavaSearchScope scope = getJavaSearchScope15(); 711 search(method, DECLARATIONS, scope, this.resultCollector); 712 assertSearchResults( 713 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 714 ); 715 } testConstructorDeclarationssElementPatternSingleParamArguments05()716 public void testConstructorDeclarationssElementPatternSingleParamArguments05() throws CoreException { 717 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java"); 718 IMethod method = selectMethod(unit, "Single", 5); 719 IJavaSearchScope scope = getJavaSearchScope15(); 720 search(method, DECLARATIONS, scope, this.resultCollector); 721 assertSearchResults( 722 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH" 723 ); 724 } testConstructorDeclarationssElementPatternSingleParamArguments06()725 public void testConstructorDeclarationssElementPatternSingleParamArguments06() throws CoreException { 726 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java"); 727 IMethod method = selectMethod(unit, "Single", 7); 728 IJavaSearchScope scope = getJavaSearchScope15(); 729 search(method, DECLARATIONS, scope, this.resultCollector); 730 assertSearchResults( 731 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 732 ); 733 } 734 735 // Search references to multiple parameterized contructors testConstructorDeclarationsElementPatternMultipleParamArguments01()736 public void testConstructorDeclarationsElementPatternMultipleParamArguments01() throws CoreException { 737 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java"); 738 IMethod method = selectMethod(unit, "Multiple", 8); 739 IJavaSearchScope scope = getJavaSearchScope15(); 740 search(method, DECLARATIONS, scope, this.resultCollector); 741 assertSearchResults( 742 "src/g5/c/def/Multiple.java g5.c.def.Multiple(T1, T2, T3) [Multiple] EXACT_MATCH" 743 ); 744 } testConstructorDeclarationsElementPatternMultipleParamArguments02()745 public void testConstructorDeclarationsElementPatternMultipleParamArguments02() throws CoreException { 746 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java"); 747 IMethod method = selectMethod(unit, "Multiple", 9); 748 IJavaSearchScope scope = getJavaSearchScope15(); 749 search(method, DECLARATIONS, scope, this.resultCollector); 750 assertSearchResults( 751 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH" 752 ); 753 } testConstructorDeclarationsElementPatternMultipleParamArguments03()754 public void testConstructorDeclarationsElementPatternMultipleParamArguments03() throws CoreException { 755 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java"); 756 IMethod method = selectMethod(unit, "Multiple", 10); 757 IJavaSearchScope scope = getJavaSearchScope15(); 758 search(method, DECLARATIONS, scope, this.resultCollector); 759 assertSearchResults( 760 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 761 ); 762 } testConstructorDeclarationsElementPatternMultipleParamArguments04()763 public void testConstructorDeclarationsElementPatternMultipleParamArguments04() throws CoreException { 764 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java"); 765 IMethod method = selectMethod(unit, "Multiple", 11); 766 IJavaSearchScope scope = getJavaSearchScope15(); 767 search(method, DECLARATIONS, scope, this.resultCollector); 768 assertSearchResults( 769 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 770 ); 771 } testConstructorDeclarationssElementPatternMultipleParamArguments05()772 public void testConstructorDeclarationssElementPatternMultipleParamArguments05() throws CoreException { 773 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java"); 774 IMethod method = selectMethod(unit, "Multiple", 5); 775 IJavaSearchScope scope = getJavaSearchScope15(); 776 search(method, DECLARATIONS, scope, this.resultCollector); 777 assertSearchResults( 778 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH" 779 ); 780 } testConstructorDeclarationssElementPatternMultipleParamArguments06()781 public void testConstructorDeclarationssElementPatternMultipleParamArguments06() throws CoreException { 782 ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java"); 783 IMethod method = selectMethod(unit, "Multiple", 7); 784 IJavaSearchScope scope = getJavaSearchScope15(); 785 search(method, DECLARATIONS, scope, this.resultCollector); 786 assertSearchResults( 787 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 788 ); 789 } 790 791 // Search string pattern references to single parameterized contructors testConstructorDeclarationsStringPatternSingleParamArguments01()792 public void testConstructorDeclarationsStringPatternSingleParamArguments01() throws CoreException { 793 IJavaSearchScope scope = getJavaSearchScope15(); 794 search("<Exception>Single", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 795 assertSearchResults( 796 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 797 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 798 ); 799 } testConstructorDeclarationsStringPatternSingleParamArguments02()800 public void testConstructorDeclarationsStringPatternSingleParamArguments02() throws CoreException { 801 IJavaSearchScope scope = getJavaSearchScope15(); 802 search("<T>Single", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 803 assertSearchResults( 804 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 805 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 806 ); 807 } testConstructorDeclarationsStringPatternSingleParamArguments03()808 public void testConstructorDeclarationsStringPatternSingleParamArguments03() throws CoreException { 809 IJavaSearchScope scope = getJavaSearchScope15(); 810 search("<U>S?ng*", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 811 assertSearchResults( 812 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 813 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 814 ); 815 } testConstructorDeclarationsStringPatternSingleParamArguments04()816 public void testConstructorDeclarationsStringPatternSingleParamArguments04() throws CoreException { 817 IJavaSearchScope scope = getJavaSearchScope15(); 818 search("Single", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 819 assertSearchResults( 820 "src/g5/c/def/Single.java g5.c.def.Single(T) [Single] EXACT_MATCH\n" + 821 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 822 "src/g5/c/def/Single.java g5.c.def.Single(Single<T>) [Single] EXACT_MATCH\n" + 823 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 824 ); 825 } testConstructorDeclarationsStringPatternSingleParamArguments05()826 public void testConstructorDeclarationsStringPatternSingleParamArguments05() throws CoreException { 827 IJavaSearchScope scope = getJavaSearchScope15(); 828 search("Single(*)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 829 assertSearchResults( 830 "src/g5/c/def/Single.java g5.c.def.Single(T) [Single] EXACT_MATCH\n" + 831 "src/g5/c/def/Single.java g5.c.def.Single(Single<T>) [Single] EXACT_MATCH" 832 ); 833 } testConstructorDeclarationsStringPatternSingleParamArguments06()834 public void testConstructorDeclarationsStringPatternSingleParamArguments06() throws CoreException { 835 IJavaSearchScope scope = getJavaSearchScope15(); 836 search("Single(*, *)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 837 assertSearchResults( 838 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 839 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 840 ); 841 } testConstructorDeclarationsStringPatternSingleParamArguments07()842 public void testConstructorDeclarationsStringPatternSingleParamArguments07() throws CoreException { 843 IJavaSearchScope scope = getJavaSearchScope15(); 844 search("Single<Exception>", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 845 assertSearchResults( 846 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 847 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 848 ); 849 } testConstructorDeclarationsStringPatternSingleParamArguments08()850 public void testConstructorDeclarationsStringPatternSingleParamArguments08() throws CoreException { 851 IJavaSearchScope scope = getJavaSearchScope15(); 852 search("Single<Exception>(*)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 853 assertSearchResults( 854 "" 855 ); 856 } testConstructorDeclarationsStringPatternSingleParamArguments09()857 public void testConstructorDeclarationsStringPatternSingleParamArguments09() throws CoreException { 858 IJavaSearchScope scope = getJavaSearchScope15(); 859 search("Single<? extends Exception>(*, *)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 860 assertSearchResults( 861 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 862 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 863 ); 864 } testConstructorDeclarationssStringPatternSingleParamArguments10()865 public void testConstructorDeclarationssStringPatternSingleParamArguments10() throws CoreException { 866 IJavaSearchScope scope = getJavaSearchScope15(); 867 search("<Exception>Single", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 868 assertSearchResults( 869 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 870 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 871 ); 872 } testConstructorDeclarationssStringPatternSingleParamArguments11()873 public void testConstructorDeclarationssStringPatternSingleParamArguments11() throws CoreException { 874 IJavaSearchScope scope = getJavaSearchScope15(); 875 search("g5.c.def.Single<Exception>", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 876 assertSearchResults( 877 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 878 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 879 ); 880 } testConstructorDeclarationssStringPatternSingleParamArguments12()881 public void testConstructorDeclarationssStringPatternSingleParamArguments12() throws CoreException { 882 IJavaSearchScope scope = getJavaSearchScope15(); 883 search("g5.c.def.<? extends Exception>Single<? extends Exception>", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 884 assertSearchResults( 885 "src/g5/c/def/Single.java g5.c.def.Single(T, U) [Single] EXACT_MATCH\n" + 886 "src/g5/c/def/Single.java g5.c.def.Single(U, Single<T>) [Single] EXACT_MATCH" 887 ); 888 } 889 890 // Search string pattern references to multiple parameterized contructors testConstructorDeclarationsStringPatternMultipleParamArguments01()891 public void testConstructorDeclarationsStringPatternMultipleParamArguments01() throws CoreException { 892 IJavaSearchScope scope = getJavaSearchScope15(); 893 search("<?, ? extends Exception, ? super RuntimeException>Multiple", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 894 assertSearchResults( 895 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 896 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 897 ); 898 } testConstructorDeclarationsStringPatternMultipleParamArguments02()899 public void testConstructorDeclarationsStringPatternMultipleParamArguments02() throws CoreException { 900 IJavaSearchScope scope = getJavaSearchScope15(); 901 search("<Object, Exception, RuntimeException>Multiple", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 902 assertSearchResults( 903 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 904 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 905 ); 906 } testConstructorDeclarationsStringPatternMultipleParamArguments03()907 public void testConstructorDeclarationsStringPatternMultipleParamArguments03() throws CoreException { 908 IJavaSearchScope scope = getJavaSearchScope15(); 909 search("Multiple", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 910 assertSearchResults( 911 "src/g5/c/def/Multiple.java g5.c.def.Multiple(T1, T2, T3) [Multiple] EXACT_MATCH\n" + 912 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 913 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH\n" + 914 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 915 ); 916 } testConstructorDeclarationsStringPatternMultipleParamArguments04()917 public void testConstructorDeclarationsStringPatternMultipleParamArguments04() throws CoreException { 918 IJavaSearchScope scope = getJavaSearchScope15(); 919 search("Multiple(*,*,*)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 920 assertSearchResults( 921 "src/g5/c/def/Multiple.java g5.c.def.Multiple(T1, T2, T3) [Multiple] EXACT_MATCH" 922 ); 923 } testConstructorDeclarationsStringPatternMultipleParamArguments05()924 public void testConstructorDeclarationsStringPatternMultipleParamArguments05() throws CoreException { 925 IJavaSearchScope scope = getJavaSearchScope15(); 926 search("Multiple(*,*,*,*)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 927 assertSearchResults( 928 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 929 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 930 ); 931 } testConstructorDeclarationsStringPatternMultipleParamArguments06()932 public void testConstructorDeclarationsStringPatternMultipleParamArguments06() throws CoreException { 933 IJavaSearchScope scope = getJavaSearchScope15(); 934 search("Multiple<RuntimeException, RuntimeException, RuntimeException>", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 935 assertSearchResults( 936 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 937 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 938 ); 939 } testConstructorDeclarationsStringPatternMultipleParamArguments07()940 public void testConstructorDeclarationsStringPatternMultipleParamArguments07() throws CoreException { 941 IJavaSearchScope scope = getJavaSearchScope15(); 942 search("Multiple<?,? extends Throwable,? extends Exception>", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 943 assertSearchResults( 944 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 945 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 946 ); 947 } testConstructorDeclarationsStringPatternMultipleParamArguments08()948 public void testConstructorDeclarationsStringPatternMultipleParamArguments08() throws CoreException { 949 IJavaSearchScope scope = getJavaSearchScope15(); 950 search("<RuntimeException, RuntimeException, RuntimeException>Multiple(*,*,*)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 951 assertSearchResults( 952 "" 953 ); 954 } testConstructorDeclarationsStringPatternMultipleParamArguments09()955 public void testConstructorDeclarationsStringPatternMultipleParamArguments09() throws CoreException { 956 IJavaSearchScope scope = getJavaSearchScope15(); 957 search("<?,? extends Throwable,? extends RuntimeException>Multiple", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 958 assertSearchResults( 959 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 960 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 961 ); 962 } testConstructorDeclarationssStringPatternMultipleParamArguments10()963 public void testConstructorDeclarationssStringPatternMultipleParamArguments10() throws CoreException { 964 IJavaSearchScope scope = getJavaSearchScope15(); 965 search("<Object,Exception,Exception>Multiple(*,*,*,*)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 966 assertSearchResults( 967 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 968 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 969 ); 970 } testConstructorDeclarationssStringPatternMultipleParamArguments11()971 public void testConstructorDeclarationssStringPatternMultipleParamArguments11() throws CoreException { 972 IJavaSearchScope scope = getJavaSearchScope15(); 973 search("g5.c.def.Multiple<Object,Exception,Exception>(*,*,*,*)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 974 assertSearchResults( 975 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 976 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 977 ); 978 } testConstructorDeclarationssStringPatternMultipleParamArguments12()979 public void testConstructorDeclarationssStringPatternMultipleParamArguments12() throws CoreException { 980 IJavaSearchScope scope = getJavaSearchScope15(); 981 search("g5.c.def.<?,? extends Throwable,? extends Throwable>Multiple<?,? extends Throwable,? extends Exception>(*,*,*,*)", CONSTRUCTOR, DECLARATIONS, scope, this.resultCollector); 982 assertSearchResults( 983 "src/g5/c/def/Multiple.java g5.c.def.Multiple(Multiple<T1,T2,T3>, U1, U2, U3) [Multiple] EXACT_MATCH\n" + 984 "src/g5/c/def/Multiple.java g5.c.def.Multiple(U1, U2, U3, Multiple<T1,T2,T3>) [Multiple] EXACT_MATCH" 985 ); 986 } 987 } 988