|
Lines 266-272
Link Here
|
| 266 |
assertTrue("Has no description", afterApiComponent.hasApiDescription()); //$NON-NLS-1$ |
266 |
assertTrue("Has no description", afterApiComponent.hasApiDescription()); //$NON-NLS-1$ |
| 267 |
IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null); |
267 |
IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null); |
| 268 |
assertNotNull("No delta", delta); //$NON-NLS-1$ |
268 |
assertNotNull("No delta", delta); //$NON-NLS-1$ |
| 269 |
assertTrue("Should be NO_DELTA", delta == ApiComparator.NO_DELTA); //$NON-NLS-1$ |
269 |
IDelta[] allLeavesDeltas = collectLeaves(delta); |
|
|
270 |
assertEquals("Wrong size", 1, allLeavesDeltas.length); //$NON-NLS-1$ |
| 271 |
IDelta child = allLeavesDeltas[0]; |
| 272 |
assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); //$NON-NLS-1$ |
| 273 |
assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags()); //$NON-NLS-1$ |
| 274 |
assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ |
| 275 |
assertTrue("Is compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ |
| 270 |
} |
276 |
} |
| 271 |
|
277 |
|
| 272 |
/** |
278 |
/** |
|
Lines 285-293
Link Here
|
| 285 |
assertTrue("Has no description", afterApiComponent.hasApiDescription()); //$NON-NLS-1$ |
291 |
assertTrue("Has no description", afterApiComponent.hasApiDescription()); //$NON-NLS-1$ |
| 286 |
IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null); |
292 |
IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null); |
| 287 |
assertNotNull("No delta", delta); //$NON-NLS-1$ |
293 |
assertNotNull("No delta", delta); //$NON-NLS-1$ |
| 288 |
assertTrue("Should be NO_DELTA", delta == ApiComparator.NO_DELTA); //$NON-NLS-1$ |
294 |
IDelta[] allLeavesDeltas = collectLeaves(delta); |
|
|
295 |
assertEquals("Wrong size", 1, allLeavesDeltas.length); //$NON-NLS-1$ |
| 296 |
IDelta child = allLeavesDeltas[0]; |
| 297 |
assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); //$NON-NLS-1$ |
| 298 |
assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags()); //$NON-NLS-1$ |
| 299 |
assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ |
| 300 |
assertTrue("Is compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ |
| 289 |
} |
301 |
} |
| 290 |
|
302 |
|
| 291 |
/** |
303 |
/** |
| 292 |
* Add @noextend on a final class and remove final on the new version of the |
304 |
* Add @noextend on a final class and remove final on the new version of the |
| 293 |
* class 247654 |
305 |
* class 247654 |
|
Lines 313-319
Link Here
|
| 313 |
assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ |
325 |
assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ |
| 314 |
assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ |
326 |
assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ |
| 315 |
} |
327 |
} |
| 316 |
|
328 |
|
| 317 |
/** |
329 |
/** |
| 318 |
* Add @noinstantiate on an abstract class and remove abstract on the new |
330 |
* Add @noinstantiate on an abstract class and remove abstract on the new |
| 319 |
* version of the class 247654 |
331 |
* version of the class 247654 |
|
Lines 339-345
Link Here
|
| 339 |
assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ |
351 |
assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); //$NON-NLS-1$ |
| 340 |
assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ |
352 |
assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); //$NON-NLS-1$ |
| 341 |
} |
353 |
} |
| 342 |
|
354 |
|
| 343 |
/** |
355 |
/** |
| 344 |
* Add extend restrictions |
356 |
* Add extend restrictions |
| 345 |
*/ |
357 |
*/ |