View | Details | Raw Unified | Return to bug 328611
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java (-1 / +37 lines)
Lines 49-55 Link Here
49
	static {
49
	static {
50
//		TESTS_NUMBERS = new int[] { 345, 346 };
50
//		TESTS_NUMBERS = new int[] { 345, 346 };
51
//		TESTS_RANGE = new int[] { 325, -1 };
51
//		TESTS_RANGE = new int[] { 325, -1 };
52
//		TESTS_NAMES = new String[] {"test0204"};
52
		TESTS_NAMES = new String[] {"testForJay"};
53
	}
53
	}
54
	public static Test suite() {
54
	public static Test suite() {
55
		return buildModelTestSuite(ASTConverter15Test.class);
55
		return buildModelTestSuite(ASTConverter15Test.class);
Lines 11155-11159 Link Here
11155
		String constantValue = (String) value.resolveConstantExpressionValue();
11155
		String constantValue = (String) value.resolveConstantExpressionValue();
11156
		assertEquals("Wrong constant value", "a", constantValue);
11156
		assertEquals("Wrong constant value", "a", constantValue);
11157
	}
11157
	}
11158
	
11159
	public void testForJay() throws CoreException, IOException {
11160
		try {
11161
			IJavaProject project = createJavaProject("P1", new String[] {""}, new String[] {"CONVERTER_JCL15_LIB"}, "", "1.5");
11162
			addLibrary(project, "lib.jar", "src.zip", new String[] {
11163
				"/P1/p/A.java",
11164
				"package p;\n" +
11165
				"public class A <T> {\n" + 
11166
				"	public class B {\n" +
11167
				"		public class  C {\n" +
11168
				"		}\n" +
11169
				"	}\n" +
11170
				"}"
11171
			}, "1.5");
11172
			this.workingCopy = getWorkingCopy("/P1/p1/Y.java", true/*resolve*/);
11173
			ASTNode node = buildAST(
11174
				"package p1;\n" +
11175
				"import p.A.B;\n" +
11176
				"import p.A.B.C;\n" +
11177
				"public class Y { \n" +
11178
				"	public void test() {\n" +
11179
				"		A a = new A();\n" +	
11180
				"		B b = a.new B();\n" +  
11181
				"		C /*start*/c/*end*/ = b.new C();\n" +
11182
				"	}\n" +
11183
				"}",
11184
				this.workingCopy,
11185
				false);
11186
			SimpleName name = (SimpleName) node;
11187
			IBinding binding = name.resolveBinding();
11188
			System.out.println(((org.eclipse.jdt.core.dom.IVariableBinding)binding).getType().getKey()); 
11189
			
11190
		} finally {
11191
			deleteProject("P1");
11192
		}
11193
	}
11158
11194
11159
}
11195
}

Return to bug 328611