Lines 482-487
Link Here
|
482 |
.getMessage()); |
482 |
.getMessage()); |
483 |
} |
483 |
} |
484 |
|
484 |
|
|
|
485 |
// Stage 1: Compile the 4 files, pack.A2 extends pack.A1 (aspects) where |
486 |
// A2 uses a protected field in A1 and pack.C2 extends pack.C1 (classes) |
487 |
// where C2 uses a protected field in C1 |
488 |
// Stage 2: make the field private in class C1 ==> compile errors in C2 |
489 |
// Stage 3: make the field private in aspect A1 whilst there's the compile |
490 |
// error. |
491 |
// There shouldn't be a BCExcpetion saying can't find delegate for pack.C2 |
492 |
public void testPr119882() { |
493 |
initialiseProject("PR119882"); |
494 |
build("PR119882"); |
495 |
assertFalse("build should have compiled ok",MyTaskListManager.hasErrorMessages()); |
496 |
alter("PR119882","inc1"); |
497 |
build("PR119882"); |
498 |
assertEquals("error message should be 'i cannot be resolved' ", |
499 |
"i cannot be resolved", |
500 |
((IMessage)MyTaskListManager.getErrorMessages().get(0)) |
501 |
.getMessage()); |
502 |
alter("PR119882","inc2"); |
503 |
build("PR119882"); |
504 |
assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(), |
505 |
MyErrorHandler.getErrorMessages().isEmpty()); |
506 |
} |
507 |
|
485 |
public void testPr112736() { |
508 |
public void testPr112736() { |
486 |
AjdeInteractionTestbed.VERBOSE = true; |
509 |
AjdeInteractionTestbed.VERBOSE = true; |
487 |
initialiseProject("PR112736"); |
510 |
initialiseProject("PR112736"); |