Lines 934-939
Link Here
|
934 |
deleteFile("/TypeHierarchy15/src/X_140340.java"); |
934 |
deleteFile("/TypeHierarchy15/src/X_140340.java"); |
935 |
} |
935 |
} |
936 |
} |
936 |
} |
|
|
937 |
/* |
938 |
* Ensures that no cycle is created in a hierarchy with 2 types with same simple names and errors |
939 |
* (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=215681 ) |
940 |
*/ |
941 |
public void testGeneric11() throws CoreException { |
942 |
try { |
943 |
createFolder("/TypeHierarchy15/src/p215681"); |
944 |
createFile( |
945 |
"/TypeHierarchy15/src/p215681/A_215681.java", |
946 |
"package p215681;\r\n" + |
947 |
"public class A_215681<E> {\n" + |
948 |
"}" |
949 |
); |
950 |
createFolder("/TypeHierarchy15/src/q215681"); |
951 |
createFile( |
952 |
"/TypeHierarchy15/src/q215681/A_215681.java", |
953 |
"package q215681;\n" + |
954 |
"import p215681.A_215681;\n" + |
955 |
"public class A_215681 extends A_215681<Object> {\n" + |
956 |
"}" |
957 |
); |
958 |
IType type = getCompilationUnit("/TypeHierarchy15/src/q215681/A_215681.java").getType("A_215681"); |
959 |
ITypeHierarchy hierarchy = type.newTypeHierarchy(null); |
960 |
assertHierarchyEquals( |
961 |
"Focus: A_215681 [in A_215681.java [in q215681 [in src [in TypeHierarchy15]]]]\n" + |
962 |
"Super types:\n" + |
963 |
"Sub types:\n", |
964 |
hierarchy |
965 |
); |
966 |
} finally { |
967 |
deleteFolder("/TypeHierarchy15/src/p215681"); |
968 |
deleteFolder("/TypeHierarchy15/src/q215681"); |
969 |
} |
970 |
} |
971 |
/* |
972 |
* Ensures that no cycle is created in a hierarchy with 2 types with same simple names and errors |
973 |
* (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=215681 ) |
974 |
*/ |
975 |
public void testGeneric12() throws CoreException { |
976 |
try { |
977 |
createFolder("/TypeHierarchy15/src/p215681"); |
978 |
createFile( |
979 |
"/TypeHierarchy15/src/p215681/A_215681.java", |
980 |
"package p215681;\r\n" + |
981 |
"public interface A_215681<E> {\n" + |
982 |
"}" |
983 |
); |
984 |
createFolder("/TypeHierarchy15/src/q215681"); |
985 |
createFile( |
986 |
"/TypeHierarchy15/src/q215681/A_215681.java", |
987 |
"package q215681;\n" + |
988 |
"import p215681.A_215681;\n" + |
989 |
"public interface A_215681 extends A_215681<Object> {\n" + |
990 |
"}" |
991 |
); |
992 |
IType type = getCompilationUnit("/TypeHierarchy15/src/q215681/A_215681.java").getType("A_215681"); |
993 |
ITypeHierarchy hierarchy = type.newTypeHierarchy(null); |
994 |
assertHierarchyEquals( |
995 |
"Focus: A_215681 [in A_215681.java [in q215681 [in src [in TypeHierarchy15]]]]\n" + |
996 |
"Super types:\n" + |
997 |
"Sub types:\n", |
998 |
hierarchy |
999 |
); |
1000 |
} finally { |
1001 |
deleteFolder("/TypeHierarchy15/src/p215681"); |
1002 |
deleteFolder("/TypeHierarchy15/src/q215681"); |
1003 |
} |
1004 |
} |
937 |
/** |
1005 |
/** |
938 |
* Ensures the correctness of all classes in a type hierarchy based on a region. |
1006 |
* Ensures the correctness of all classes in a type hierarchy based on a region. |
939 |
*/ |
1007 |
*/ |