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

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java (-1 / +41 lines)
Lines 39-45 Link Here
39
	}
39
	}
40
40
41
	static {
41
	static {
42
//		TESTS_NUMBERS = new int[] { 194 };
42
//		TESTS_NUMBERS = new int[] { 195 };
43
//		TESTS_NAMES = new String[] {"test0189"};
43
//		TESTS_NAMES = new String[] {"test0189"};
44
	}
44
	}
45
	public static Test suite() {
45
	public static Test suite() {
Lines 5839-5842 Link Here
5839
    	ArrayType arrayType = (ArrayType) type;
5839
    	ArrayType arrayType = (ArrayType) type;
5840
    	assertEquals("Should be 1", 1, arrayType.getDimensions());
5840
    	assertEquals("Should be 1", 1, arrayType.getDimensions());
5841
	}
5841
	}
5842
	
5843
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=106834
5844
	public void test0195() throws JavaModelException {
5845
    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
5846
    	String contents =
5847
			"public class X {\n" +
5848
			"	<S extends Number, T> void take(S e, T f) {}\n" +
5849
			"	<S extends Number, T> void take(T e, S f) {}\n" +
5850
			"	<S extends Number, T extends S> void take(T e, S f) {}\n" +
5851
			"}";
5852
    	ASTNode node = buildAST(
5853
    			contents,
5854
    			this.workingCopy);
5855
    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
5856
    	CompilationUnit unit = (CompilationUnit) node;
5857
    	node = getASTNode(unit, 0, 0);
5858
    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
5859
    	MethodDeclaration methodDeclaration = (MethodDeclaration) node;
5860
    	IMethodBinding methodBinding = methodDeclaration.resolveBinding();
5861
    	
5862
    	node = getASTNode(unit, 0, 1);
5863
    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
5864
    	MethodDeclaration methodDeclaration2 = (MethodDeclaration) node;
5865
    	IMethodBinding methodBinding2 = methodDeclaration2.resolveBinding();
5866
    	
5867
    	node = getASTNode(unit, 0, 2);
5868
    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
5869
    	MethodDeclaration methodDeclaration3 = (MethodDeclaration) node;
5870
    	IMethodBinding methodBinding3 = methodDeclaration3.resolveBinding();
5871
5872
    	assertFalse("Bindings are equals", methodBinding.isEqualTo(methodBinding2));
5873
    	assertFalse("Bindings are equals", methodBinding2.isEqualTo(methodBinding));
5874
    	assertFalse("Bindings are equals", methodBinding3.isEqualTo(methodBinding));
5875
    	assertFalse("Bindings are equals", methodBinding3.isEqualTo(methodBinding2));
5876
    	assertFalse("Bindings are equals", methodBinding2.isEqualTo(methodBinding3));
5877
    	assertFalse("Bindings are equals", methodBinding.isEqualTo(methodBinding3));
5878
    	assertTrue("Bindings are not equals", methodBinding3.isEqualTo(methodBinding3));
5879
    	assertTrue("Bindings are not equals", methodBinding2.isEqualTo(methodBinding2));
5880
    	assertTrue("Bindings are not equals", methodBinding.isEqualTo(methodBinding));
5881
    }
5842
}
5882
}

Return to bug 106834