public void testGetAllSubtypes_T1_R1_phantomMode() throws JavaModelException { _focusType = _T1_R1; _testObj = createTypeHierarchy(_focusType); OTTypeHierarchies.getInstance().setPhantomMode(_testObj, true); IType[] expected = new IType[] { _T2_R1, _T2_R2, _T3_R1, _T3_R2, _T4_R2, _phantom_T4_R1, _T5_R1, _T5_R2, _T5_R3, _T6_R1, _phantom_T6_R2, _T7_R2, _T7_R3, _phantom_T7_R1, _T8_R2, _phantom_T8_R1 }; IType[] actual = _testObj.getAllSubtypes(_focusType); assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); }
public void testGetSubtypes_T6_R1_phantomMode() throws JavaModelException { _focusType = _T6_R1; _testObj = createTypeHierarchy(_focusType); OTTypeHierarchies.getInstance().setPhantomMode(_testObj, true); IType[] expected = new IType[] { _phantom_T6_R2, _phantom_T8_R1, // _T8_R2 // indirect: tsub of phantom explicit // subclass (T6$R2), but in phantom mode we stop at that phantom }; IType[] actual = _testObj.getSubtypes(_focusType); assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); }