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

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java (-1 / +28 lines)
Lines 34-40 Link Here
34
	this.displayName = true;
34
	this.displayName = true;
35
}
35
}
36
static {
36
static {
37
//	TESTS_NAMES= new String[] { "testBinaryTypeHiddenByOtherJar" };
37
//	TESTS_NAMES= new String[] { "testGeneric7" };
38
}
38
}
39
public static Test suite() {
39
public static Test suite() {
40
	return buildTestSuite(TypeHierarchyTests.class);
40
	return buildTestSuite(TypeHierarchyTests.class);
Lines 107-112 Link Here
107
		"public class A<E> implements I<E> {\n" +
107
		"public class A<E> implements I<E> {\n" +
108
		"}"
108
		"}"
109
	);
109
	);
110
	createFile(
111
		"/TypeHierarchy15/src/X99606.java", 
112
		"public class X99606 extends Y99606<X99606.Color> {\n" + 
113
		"	static class Color {}\n" + 
114
		"}"
115
	);
116
	createFile(
117
		"/TypeHierarchy15/src/Y99606.java", 
118
		"public class Y99606<T> {\n" + 
119
		"}"
120
	);
110
}
121
}
111
122
112
/* (non-Javadoc)
123
/* (non-Javadoc)
Lines 961-966 Link Here
961
	IType[] subtypes = hierarchy.getSubtypes(type);
972
	IType[] subtypes = hierarchy.getSubtypes(type);
962
	assertEquals("Unexpected key", "Lutil/Map<TK;TV;>;", subtypes.length < 2 ? null : subtypes[1].getKey());
973
	assertEquals("Unexpected key", "Lutil/Map<TK;TV;>;", subtypes.length < 2 ? null : subtypes[1].getKey());
963
}
974
}
975
/*
976
 * Ensures that a hierarchy on a generic type that is extended using a member as a type parameter can be opened
977
 * (regression test for bug 99606 Subtype not found if parameterized on inner class)
978
 */
979
public void testGeneric7() throws JavaModelException {
980
	IType type = getCompilationUnit("/TypeHierarchy15/src/Y99606.java").getType("Y99606");
981
	ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
982
	assertHierarchyEquals(
983
		"Focus: Y99606 [in Y99606.java [in <default> [in src [in TypeHierarchy15]]]]\n" + 
984
		"Super types:\n" + 
985
		"  Object [in Object.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in TypeHierarchy15]]]]\n" + 
986
		"Sub types:\n" + 
987
		"  X99606 [in X99606.java [in <default> [in src [in TypeHierarchy15]]]]\n",
988
		hierarchy
989
	);
990
}
964
/**
991
/**
965
 * Ensures the correctness of all classes in a type hierarchy based on a region.
992
 * Ensures the correctness of all classes in a type hierarchy based on a region.
966
 */
993
 */

Return to bug 99606