summaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authoraclement <aclement>2005-04-05 14:50:06 +0000
committeraclement <aclement>2005-04-05 14:50:06 +0000
commite460b1e3dae5d05b3457ff96746292516b963c32 (patch)
tree5ee9bc2fd69b26d38bff394aed1ea14483b39618 /tests/src
parent8c4479ee1f75c3c336f3519eaa1c2c03719a1cbb (diff)
downloadaspectj-e460b1e3dae5d05b3457ff96746292516b963c32.tar.gz
aspectj-e460b1e3dae5d05b3457ff96746292516b963c32.zip
Fix for problem introduced when checking contents of dirs on the classpath for changes. (see PR85297)
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java
index aa34783b9..41528d40c 100644
--- a/tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java
@@ -10,9 +10,12 @@
package org.aspectj.systemtest.incremental;
import java.io.File;
+import java.util.List;
import junit.framework.Test;
+import org.aspectj.ajdt.internal.core.builder.AjState;
+import org.aspectj.ajdt.internal.core.builder.IStateListener;
import org.aspectj.testing.XMLBasedAjcTestCase;
public class IncrementalTests extends org.aspectj.testing.XMLBasedAjcTestCase {
@@ -101,6 +104,28 @@ public class IncrementalTests extends org.aspectj.testing.XMLBasedAjcTestCase {
copyFileAndDoIncrementalBuild("changes/Main.20.java","src/app/Main.java");
run("app.Main");
}
+
+ /**
+ * See bug report 85297. We plugged a hole so that we check whether the contents of
+ * directories on the classpath have changed when deciding whether we can do an
+ * incremental build or not - the implementation didn't allow for the output location
+ * being on the classpath. This test verifies the fix is OK
+ */
+ public void testIncrementalOKWithOutputPathOnClasspath() throws Exception {
+ class MyStateListener implements IStateListener {
+ public boolean pathChange = false;
+ public void pathChangeDetected() {pathChange = true;}
+ public void aboutToCompareClasspaths(List oldClasspath, List newClasspath) {}
+ public void detectedClassChangeInThisDir(File f) {}
+ };
+ MyStateListener sl = new MyStateListener();
+ AjState.stateListener = sl;
+ runTest("change source");
+ nextIncrement(false);
+ copyFileAndDoIncrementalBuild("changes/Main.20.java","src/app/Main.java");
+ assertTrue("Did not expect a path change to be detected ",!sl.pathChange);
+ run("app.Main");
+ }
public void test009() throws Exception {
runTest("incrementally change only string literal, still expect advice");