summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-01-27 12:30:21 +0000
committeraclement <aclement>2006-01-27 12:30:21 +0000
commit551b446bec83bef0f7df1f57353fdb4297bc14a6 (patch)
tree8fd345f9cbf144eed7ea918622789fdca20114a0 /tests
parent2602c786913715b1b0530037d43cf47e682637cc (diff)
downloadaspectj-551b446bec83bef0f7df1f57353fdb4297bc14a6.tar.gz
aspectj-551b446bec83bef0f7df1f57353fdb4297bc14a6.zip
fix for 121395 - error message on stupid aspectpath
Diffstat (limited to 'tests')
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java18
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java13
2 files changed, 29 insertions, 2 deletions
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java
index 36a7c2c1d..3af1d2fb2 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java
@@ -69,6 +69,10 @@ public class AjdeInteractionTestbed extends TestCase {
public static void configureNonStandardCompileOptions(String options) {
MyBuildOptionsAdapter.setNonStandardOptions(options);
}
+
+ public static void configureAspectPath(Set aspectpath) {
+ MyProjectPropertiesAdapter.setAspectpath(aspectpath);
+ }
// End of methods for configuring the build
@@ -79,6 +83,7 @@ public class AjdeInteractionTestbed extends TestCase {
MyStateListener.reset();
MyBuildProgressMonitor.reset();
MyTaskListManager.reset();
+ MyProjectPropertiesAdapter.reset();
// Create a sandbox in which to work
createEmptySandbox();
@@ -364,8 +369,13 @@ public class AjdeInteractionTestbed extends TestCase {
return _instance;
}
+ public static void reset() {
+ _instance.aspectPath=null;
+ }
+
private String projectName = null;
private String classPath = "";
+ private Set aspectPath = null;
public static void setActiveProject(String n) {
_instance.projectName = n;
@@ -388,6 +398,10 @@ public class AjdeInteractionTestbed extends TestCase {
this.classPath = path;
}
+ public static void setAspectpath(Set path) {
+ _instance.aspectPath = path;
+ }
+
// interface impl below
// DOESSOMETHING
@@ -503,8 +517,8 @@ public class AjdeInteractionTestbed extends TestCase {
}
public Set getAspectPath() {
- log("MyProjectProperties.getAspectPath()");
- return null;
+ log("MyProjectProperties.getAspectPath("+aspectPath+")");
+ return aspectPath;
}
public static void log(String s) {
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index 8eb84ceee..939902b9e 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -16,8 +16,10 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Set;
import org.aspectj.ajdt.internal.core.builder.AjState;
import org.aspectj.ajdt.internal.core.builder.IncrementalStateManager;
@@ -61,6 +63,17 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed {
checkWasntFullBuild();
checkCompileWeaveCount(0,0);
}
+
+ // source code doesnt matter, we are checking invalid path handling
+ public void testInvalidAspectpath_pr121395() {
+ initialiseProject("P1");
+ File f = new File("foo.jar");
+ Set s = new HashSet();
+ s.add(f);
+ configureAspectPath(s);
+ build("P1"); // This first build will be batch
+ checkForError("invalid aspectpath entry");
+ }
// Make simple changes to a project, adding a class