|
Lines 36-42
Link Here
|
| 36 |
public static Test suite() { |
36 |
public static Test suite() { |
| 37 |
if (true) return new TestSuite(ClassDeltaTests.class); |
37 |
if (true) return new TestSuite(ClassDeltaTests.class); |
| 38 |
TestSuite suite = new TestSuite(ClassDeltaTests.class.getName()); |
38 |
TestSuite suite = new TestSuite(ClassDeltaTests.class.getName()); |
| 39 |
suite.addTest(new ClassDeltaTests("test138")); |
39 |
suite.addTest(new ClassDeltaTests("test140")); |
| 40 |
return suite; |
40 |
return suite; |
| 41 |
} |
41 |
} |
| 42 |
|
42 |
|
|
Lines 3229-3232
Link Here
|
| 3229 |
assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); |
3229 |
assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); |
| 3230 |
assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); |
3230 |
assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); |
| 3231 |
assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); |
3231 |
assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); |
| 3232 |
}} |
3232 |
} |
|
|
3233 |
/** |
| 3234 |
* Remove internal superclass that contains public method |
| 3235 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=247703 |
| 3236 |
*/ |
| 3237 |
public void test139() { |
| 3238 |
deployBundles("test139"); |
| 3239 |
IApiProfile before = getBeforeState(); |
| 3240 |
IApiProfile after = getAfterState(); |
| 3241 |
IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME); |
| 3242 |
assertNotNull("no api component", beforeApiComponent); |
| 3243 |
IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME); |
| 3244 |
assertNotNull("no api component", afterApiComponent); |
| 3245 |
IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API); |
| 3246 |
assertNotNull("No delta", delta); |
| 3247 |
IDelta[] allLeavesDeltas = collectLeaves(delta); |
| 3248 |
assertEquals("Wrong size", 1, allLeavesDeltas.length); |
| 3249 |
IDelta child = allLeavesDeltas[0]; |
| 3250 |
assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); |
| 3251 |
assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); |
| 3252 |
assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); |
| 3253 |
assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); |
| 3254 |
} |
| 3255 |
/** |
| 3256 |
* Remove internal superclass that contains public method |
| 3257 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=247703 |
| 3258 |
*/ |
| 3259 |
public void test140() { |
| 3260 |
deployBundles("test140"); |
| 3261 |
IApiProfile before = getBeforeState(); |
| 3262 |
IApiProfile after = getAfterState(); |
| 3263 |
IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME); |
| 3264 |
assertNotNull("no api component", beforeApiComponent); |
| 3265 |
IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME); |
| 3266 |
assertNotNull("no api component", afterApiComponent); |
| 3267 |
IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.API); |
| 3268 |
assertNotNull("No delta", delta); |
| 3269 |
IDelta[] allLeavesDeltas = collectLeaves(delta); |
| 3270 |
assertEquals("Wrong size", 1, allLeavesDeltas.length); |
| 3271 |
IDelta child = allLeavesDeltas[0]; |
| 3272 |
assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); |
| 3273 |
assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); |
| 3274 |
assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); |
| 3275 |
assertTrue("Is compatible", DeltaProcessor.isCompatible(child)); |
| 3276 |
} |
| 3277 |
} |