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

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java (-1 / +32 lines)
Lines 47-53 Link Here
47
	}
47
	}
48
48
49
	static {
49
	static {
50
//		TESTS_NUMBERS = new int[] { 232, 233 };
50
//		TESTS_NUMBERS = new int[] { 234 };
51
//		TESTS_NAMES = new String[] {"test0204"};
51
//		TESTS_NAMES = new String[] {"test0204"};
52
	}
52
	}
53
	public static Test suite() {
53
	public static Test suite() {
Lines 7486-7489 Link Here
7486
		assertEquals("Wrong key", "message", pairs[0].getName());
7486
		assertEquals("Wrong key", "message", pairs[0].getName());
7487
		assertEquals("Wrong value", "Hello, World!", pairs[0].getValue());
7487
		assertEquals("Wrong value", "Hello, World!", pairs[0].getValue());
7488
	}
7488
	}
7489
	
7490
	/*
7491
	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=169744
7492
	 */
7493
	public void test0234() throws JavaModelException {
7494
		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
7495
		String contents =
7496
			"class B {\n" + 
7497
			"	<T> int m() {\n" + 
7498
			"		return 0;\n" + 
7499
			"	}\n" + 
7500
			"}\n" + 
7501
			"public class X<T> extends B {\n" + 
7502
			"	int i = super.<T> m();\n" + 
7503
			"}";
7504
		ASTNode node = buildAST(
7505
				contents,
7506
				this.workingCopy,
7507
				true);
7508
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
7509
		CompilationUnit unit = (CompilationUnit) node;
7510
		assertProblemsSize(unit, 0);
7511
		node = getASTNode(unit, 1, 0);
7512
		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
7513
		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
7514
		List fragments = fieldDeclaration.fragments();
7515
		assertEquals("Wrong size", 1, fragments.size());
7516
		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
7517
		Expression expression = fragment.getInitializer();
7518
		checkSourceRange(expression, "super.<T> m()", contents);
7519
	}
7489
}
7520
}

Return to bug 169744