summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2005-11-11 18:24:14 +0000
committeraclement <aclement>2005-11-11 18:24:14 +0000
commitefbf62be5e5732e14a05a8bbe509289c8f6167d0 (patch)
treea4a76d565b2c5e1a7e0f985c2e42476d27d3fcd2
parentb1d058921b7d8bc44035bbb2c2b38627c09eedbe (diff)
downloadaspectj-efbf62be5e5732e14a05a8bbe509289c8f6167d0.tar.gz
aspectj-efbf62be5e5732e14a05a8bbe509289c8f6167d0.zip
fix for pr113531
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java41
1 files changed, 24 insertions, 17 deletions
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index acb91bddb..7cb951e1a 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -23,6 +23,7 @@ import org.aspectj.ajdt.internal.core.builder.AjState;
import org.aspectj.ajdt.internal.core.builder.IncrementalStateManager;
import org.aspectj.asm.AsmManager;
import org.aspectj.asm.IProgramElement;
+import org.aspectj.bridge.IMessage;
import org.aspectj.testing.util.FileUtil;
/**
@@ -296,23 +297,29 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed {
build("PR111779");
}
*/
-
-// public void testPr113531() {
-// initialiseProject("PR113531");
-// build("PR113531");
-// assertFalse("build should have compiled ok",
-// MyTaskListManager.hasErrorMessages());
-// alter("PR113531","inc1");
-// build("PR113531");
-// assertEquals("error message should be 'foo cannot be resolved' ",
-// "foo cannot be resolved",
-// ((IMessage)MyTaskListManager.getErrorMessages().get(0))
-// .getMessage());
-// alter("PR113531","inc2");
-// build("PR113531");
-// assertTrue("There should be no exceptions handled",
-// MyErrorHandler.getErrorMessages().isEmpty());
-// }
+ // Stage1: Compile two files, pack.A and pack.A1 - A1 sets a protected field in A.
+ // Stage2: make the field private in class A > gives compile error
+ // Stage3: Add a new aspect whilst there is a compile error !
+ public void testPr113531() {
+ initialiseProject("PR113531");
+ build("PR113531");
+ assertFalse("build should have compiled ok",
+ MyTaskListManager.hasErrorMessages());
+ alter("PR113531","inc1");
+ build("PR113531");
+ assertEquals("error message should be 'foo cannot be resolved' ",
+ "foo cannot be resolved",
+ ((IMessage)MyTaskListManager.getErrorMessages().get(0))
+ .getMessage());
+ alter("PR113531","inc2");
+ build("PR113531");
+ assertTrue("There should be no exceptions handled:\n"+MyErrorHandler.getErrorMessages(),
+ MyErrorHandler.getErrorMessages().isEmpty());
+ assertEquals("error message should be 'foo cannot be resolved' ",
+ "foo cannot be resolved",
+ ((IMessage)MyTaskListManager.getErrorMessages().get(0))
+ .getMessage());
+ }
// other possible tests: