aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2005-11-28 13:18:57 +0000
committeraclement <aclement>2005-11-28 13:18:57 +0000
commit340f99477cb028f696760f54ebaaf91f840d9eca (patch)
tree1211600df136e7e34e478c560797004343c6684c /tests
parentbcabce0283aec3c44a99000b3970bd880fee72a0 (diff)
downloadaspectj-340f99477cb028f696760f54ebaaf91f840d9eca.tar.gz
aspectj-340f99477cb028f696760f54ebaaf91f840d9eca.zip
pr93310 now fixed !
Diffstat (limited to 'tests')
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java7
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java53
2 files changed, 37 insertions, 23 deletions
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java
index f7a1ef17e..e98f0aad5 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java
@@ -703,17 +703,24 @@ public class AjdeInteractionTestbed extends TestCase {
public static boolean informedAboutKindOfBuild;
public static boolean fullBuildOccurred;
+ public static List detectedDeletions = new ArrayList();
public static void reset() {
informedAboutKindOfBuild=false;
fullBuildOccurred=false;
+ if (detectedDeletions!=null) detectedDeletions.clear();
}
public boolean pathChange = false;
public void pathChangeDetected() {pathChange = true;}
public void aboutToCompareClasspaths(List oldClasspath, List newClasspath) {}
public void detectedClassChangeInThisDir(File f) {}
+
+ public void detectedAspectDeleted(File f) {
+ detectedDeletions.add(f.toString());
+ }
+
public void buildSuccessful(boolean wasFullBuild) {
informedAboutKindOfBuild= true;
fullBuildOccurred=wasFullBuild;
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index df3255e7d..15fa9192e 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -321,29 +321,36 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed {
}
*/
-// public void testPr93310_1() {
-// AjdeInteractionTestbed.VERBOSE = true;
-// initialiseProject("PR93310_1");
-// build("PR93310_1");
-// checkWasFullBuild();
-// String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_1" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java";
-// (new File(fileC2)).delete();
-// alter("PR93310_1","inc1");
-// build("PR93310_1");
-// checkWasntFullBuild();
-// }
-
-// public void testPr93310_2() {
-// AjdeInteractionTestbed.VERBOSE = true;
-// initialiseProject("PR93310_2");
-// build("PR93310_2");
-// checkWasFullBuild();
-// String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_2" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java";
-// (new File(fileC2)).delete();
-// alter("PR93310_2","inc1");
-// build("PR93310_2");
-// checkWasntFullBuild();
-// }
+ public void testPr93310_1() {
+ initialiseProject("PR93310_1");
+ build("PR93310_1");
+ checkWasFullBuild();
+ String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_1" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java";
+ (new File(fileC2)).delete();
+ alter("PR93310_1","inc1");
+ build("PR93310_1");
+ checkWasFullBuild();
+ int l = AjdeInteractionTestbed.MyStateListener.detectedDeletions.size();
+ assertTrue("Expected one deleted file to be noticed, but detected: "+l,l==1);
+ String name = (String)AjdeInteractionTestbed.MyStateListener.detectedDeletions.get(0);
+ assertTrue("Should end with C2.java but is "+name,name.endsWith("C2.java"));
+ }
+
+ public void testPr93310_2() {
+ initialiseProject("PR93310_2");
+ build("PR93310_2");
+ checkWasFullBuild();
+ String fileC2 = getWorkingDir().getAbsolutePath() + File.separatorChar + "PR93310_2" + File.separatorChar + "src" + File.separatorChar + "pack" + File.separatorChar + "C2.java";
+ (new File(fileC2)).delete();
+ alter("PR93310_2","inc1");
+ build("PR93310_2");
+ checkWasFullBuild();
+ int l = AjdeInteractionTestbed.MyStateListener.detectedDeletions.size();
+ assertTrue("Expected one deleted file to be noticed, but detected: "+l,l==1);
+ String name = (String)AjdeInteractionTestbed.MyStateListener.detectedDeletions.get(0);
+ assertTrue("Should end with C2.java but is "+name,name.endsWith("C2.java"));
+ }
+
// 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 !