Lines 10-15
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.jdt.core.tests.model; |
11 |
package org.eclipse.jdt.core.tests.model; |
12 |
|
12 |
|
|
|
13 |
import org.eclipse.core.runtime.CoreException; |
13 |
import org.eclipse.jdt.core.*; |
14 |
import org.eclipse.jdt.core.*; |
14 |
import org.eclipse.jdt.core.IJavaProject; |
15 |
import org.eclipse.jdt.core.IJavaProject; |
15 |
import org.eclipse.jdt.core.IPackageFragmentRoot; |
16 |
import org.eclipse.jdt.core.IPackageFragmentRoot; |
Lines 24-31
Link Here
|
24 |
super(name); |
25 |
super(name); |
25 |
} |
26 |
} |
26 |
|
27 |
|
|
|
28 |
// Use this static initializer to specify subset for tests |
29 |
// All specified tests which do not belong to the class are skipped... |
30 |
static { |
31 |
// TESTS_PREFIX = "testBug"; |
32 |
// TESTS_NAMES = new String[] { "testTypeParameter" }; |
33 |
// TESTS_NUMBERS = new int[] { 13 }; |
34 |
// TESTS_RANGE = new int[] { 16, -1 }; |
35 |
} |
27 |
public static Test suite() { |
36 |
public static Test suite() { |
28 |
return new Suite(ClassFileTests.class); |
37 |
return buildTestSuite(ClassFileTests.class); |
29 |
} |
38 |
} |
30 |
|
39 |
|
31 |
public void setUpSuite() throws Exception { |
40 |
public void setUpSuite() throws Exception { |
Lines 228-233
Link Here
|
228 |
} |
237 |
} |
229 |
|
238 |
|
230 |
/* |
239 |
/* |
|
|
240 |
* Ensure that opening a type parameter when its parent has not been open yet |
241 |
* doesn't throw a JavaModelException |
242 |
* (regression test for bug 101228 JME on code assist) |
243 |
*/ |
244 |
public void testTypeParameter() throws CoreException { |
245 |
IClassFile classFile = this.jarRoot.getPackageFragment("generic").getClassFile("X.class"); |
246 |
ITypeParameter typeParameter = classFile.getType().getTypeParameter("T"); |
247 |
classFile.close(); |
248 |
assertStringsEqual( |
249 |
"Unexpected bounds", |
250 |
"java.lang.Object\n", |
251 |
typeParameter.getBounds()); |
252 |
} |
253 |
|
254 |
/* |
231 |
* Ensure that a method with varargs has the AccVarargs flag set. |
255 |
* Ensure that a method with varargs has the AccVarargs flag set. |
232 |
*/ |
256 |
*/ |
233 |
public void testVarargs() throws JavaModelException { |
257 |
public void testVarargs() throws JavaModelException { |