### Eclipse Workspace Patch 1.0 #P org.eclipse.pde.api.tools.tests Index: src/org/eclipse/pde/api/tools/builder/tests/compatibility/ClassCompatibilityHierarchyTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/compatibility/ClassCompatibilityHierarchyTests.java,v retrieving revision 1.5 diff -u -r1.5 ClassCompatibilityHierarchyTests.java --- src/org/eclipse/pde/api/tools/builder/tests/compatibility/ClassCompatibilityHierarchyTests.java 4 Sep 2008 14:15:56 -0000 1.5 +++ src/org/eclipse/pde/api/tools/builder/tests/compatibility/ClassCompatibilityHierarchyTests.java 5 Sep 2008 01:29:00 -0000 @@ -74,6 +74,21 @@ flags); } + /** + * Returns a problem id for a compatibility remove to a class based on the + * specified flags. + * + * @param flags + * @return problem id + */ + protected int getRemovedProblemId(int flags) { + return ApiProblemFactory.createProblemId( + IApiProblem.CATEGORY_COMPATIBILITY, + IDelta.CLASS_ELEMENT_TYPE, + IDelta.REMOVED, + flags); + } + /* (non-Javadoc) * @see org.eclipse.pde.api.tools.builder.tests.ApiBuilderTests#getTestingProjectName() */ @@ -87,7 +102,7 @@ private void xReduceHierarchyCtoA(boolean incremental) throws Exception { IPath filePath = WORKSPACE_CLASSES_PACKAGE_A.append("ReduceFromCtoA.java"); int[] ids = new int[] { - getChangedProblemId(IDelta.CONTRACTED_SUPERCLASS_SET) + getChangedProblemId(IDelta.SUPERCLASS) }; setExpectedProblemIds(ids); String[][] args = new String[1][]; @@ -110,7 +125,7 @@ private void xReduceHierarchyCtoB(boolean incremental) throws Exception { IPath filePath = WORKSPACE_CLASSES_PACKAGE_A.append("ReduceFromCtoB.java"); int[] ids = new int[] { - getChangedProblemId(IDelta.CONTRACTED_SUPERCLASS_SET) + getChangedProblemId(IDelta.SUPERCLASS) }; setExpectedProblemIds(ids); String[][] args = new String[1][]; @@ -133,7 +148,7 @@ private void xReduceHierarchyCtoObject(boolean incremental) throws Exception { IPath filePath = WORKSPACE_CLASSES_PACKAGE_A.append("ReduceFromCtoObject.java"); int[] ids = new int[] { - getChangedProblemId(IDelta.SUPERCLASS) // TODO appears as changed superclass versus reduced + getRemovedProblemId(IDelta.SUPERCLASS) // TODO appears as changed superclass versus reduced }; setExpectedProblemIds(ids); String[][] args = new String[1][]; @@ -156,7 +171,7 @@ private void xChangeHierarchyAtoD(boolean incremental) throws Exception { IPath filePath = WORKSPACE_CLASSES_PACKAGE_A.append("ChangedFromAtoD.java"); int[] ids = new int[] { - getChangedProblemId(IDelta.CONTRACTED_SUPERCLASS_SET) // TODO appears as reduced versus changed superclass + getChangedProblemId(IDelta.SUPERCLASS) }; setExpectedProblemIds(ids); String[][] args = new String[1][];