Lines 12-17
Link Here
|
12 |
|
12 |
|
13 |
import java.util.Locale; |
13 |
import java.util.Locale; |
14 |
|
14 |
|
|
|
15 |
import junit.framework.Test; |
16 |
|
15 |
import org.eclipse.jdt.core.compiler.IProblem; |
17 |
import org.eclipse.jdt.core.compiler.IProblem; |
16 |
import org.eclipse.jdt.core.tests.util.AbstractCompilerTest; |
18 |
import org.eclipse.jdt.core.tests.util.AbstractCompilerTest; |
17 |
import org.eclipse.jdt.internal.compiler.ISourceElementRequestor; |
19 |
import org.eclipse.jdt.internal.compiler.ISourceElementRequestor; |
Lines 38-43
Link Here
|
38 |
super(testName); |
40 |
super(testName); |
39 |
this.source = source; |
41 |
this.source = source; |
40 |
} |
42 |
} |
|
|
43 |
static { |
44 |
// TESTS_NUMBERS = new int[] { 99662 }; |
45 |
} |
46 |
public static Test suite() { |
47 |
return buildTestSuite(SourceElementParserTest.class); |
48 |
} |
41 |
/** |
49 |
/** |
42 |
* acceptConstructorReference method comment. |
50 |
* acceptConstructorReference method comment. |
43 |
*/ |
51 |
*/ |
Lines 5102-5108
Link Here
|
5102 |
" java.lang.Object(0)\n" + |
5110 |
" java.lang.Object(0)\n" + |
5103 |
"}"; |
5111 |
"}"; |
5104 |
|
5112 |
|
5105 |
String testName = "test01: full parse"; |
5113 |
String testName = "test76: full parse"; |
5106 |
fullParse(s,testName); |
5114 |
fullParse(s,testName); |
5107 |
|
5115 |
|
5108 |
assertEquals( |
5116 |
assertEquals( |
Lines 5136-5139
Link Here
|
5136 |
expectedUnitToString, |
5144 |
expectedUnitToString, |
5137 |
currentType.toString()); |
5145 |
currentType.toString()); |
5138 |
} |
5146 |
} |
|
|
5147 |
/** |
5148 |
* Bug 99662:[1.5] JavaModel returns inexistent IType for package-info ICompilationUnits |
5149 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=99662" |
5150 |
* |
5151 |
*/ |
5152 |
public void testBug99662() { |
5153 |
|
5154 |
String s = |
5155 |
"@Deprecated\n" + |
5156 |
"package p;\n"; |
5157 |
|
5158 |
String testName = "package-info.java"; |
5159 |
fullParse(s,testName); |
5160 |
|
5161 |
assertNull("package-info.java file should not have ANY type!", this.currentType); |
5162 |
} |
5139 |
} |
5163 |
} |