Lines 161-167
Link Here
|
161 |
/* |
161 |
/* |
162 |
* Ensures that the IJavaElement of an IBinding representing an array type is correct. |
162 |
* Ensures that the IJavaElement of an IBinding representing an array type is correct. |
163 |
*/ |
163 |
*/ |
164 |
public void testArrayType() throws JavaModelException { |
164 |
public void testArrayType1() throws JavaModelException { |
165 |
ASTNode node = buildAST( |
165 |
ASTNode node = buildAST( |
166 |
"public class X {\n" + |
166 |
"public class X {\n" + |
167 |
" /*start*/Object[]/*end*/ field;\n" + |
167 |
" /*start*/Object[]/*end*/ field;\n" + |
Lines 179-184
Link Here
|
179 |
} |
179 |
} |
180 |
|
180 |
|
181 |
/* |
181 |
/* |
|
|
182 |
* Ensures that the IJavaElement of an IBinding representing an array type of base type null. |
183 |
* (regression test for bug 100142 |
184 |
CCE when calling ITypeBinding#getJavaElement() on char[][] |
185 |
*/ |
186 |
public void testArrayType2() throws JavaModelException { |
187 |
ASTNode node = buildAST( |
188 |
"public class X {\n" + |
189 |
" /*start*/char[][]/*end*/ field;\n" + |
190 |
"}" |
191 |
); |
192 |
IBinding binding = ((ArrayType) node).resolveBinding(); |
193 |
assertNotNull("No binding", binding); |
194 |
IJavaElement element = binding.getJavaElement(); |
195 |
assertElementEquals( |
196 |
"Unexpected Java element", |
197 |
"<null>", |
198 |
element |
199 |
); |
200 |
} |
201 |
|
202 |
/* |
182 |
* Ensures that the IJavaElement of an IBinding representing a method coming from a class file is correct. |
203 |
* Ensures that the IJavaElement of an IBinding representing a method coming from a class file is correct. |
183 |
* (regression test for bug 91445 IMethodBinding.getJavaElement() returns an "unopen" IMethod) |
204 |
* (regression test for bug 91445 IMethodBinding.getJavaElement() returns an "unopen" IMethod) |
184 |
*/ |
205 |
*/ |