View | Details | Raw Unified | Return to bug 96633 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java (+20 lines)
Lines 154-159 Link Here
154
	}
154
	}
155
155
156
	/*
156
	/*
157
	 * Ensures that the IJavaElement of an IBinding representing an array type is correct.
158
	 */
159
	public void testArrayType() throws JavaModelException {
160
		ASTNode node = buildAST(
161
			"public class X {\n" +
162
			"  /*start*/Object[]/*end*/ field;\n" +
163
			"}"
164
		);
165
		IBinding binding = ((ArrayType) node).resolveBinding();
166
		assertNotNull("No binding", binding);
167
		IJavaElement element = binding.getJavaElement();
168
		assertElementEquals(
169
			"Unexpected Java element",
170
			"Object [in Object.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in P]]]]",
171
			element
172
		);
173
		assertTrue("Element should exist", element.exists());
174
	}
175
176
	/*
157
	 * Ensures that the IJavaElement of an IBinding representing a method coming from a class file is correct.
177
	 * Ensures that the IJavaElement of an IBinding representing a method coming from a class file is correct.
158
	 * (regression test for bug 91445 IMethodBinding.getJavaElement() returns an "unopen" IMethod)
178
	 * (regression test for bug 91445 IMethodBinding.getJavaElement() returns an "unopen" IMethod)
159
	 */
179
	 */

Return to bug 96633