summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authoraclement <aclement>2004-08-03 12:31:29 +0000
committeraclement <aclement>2004-08-03 12:31:29 +0000
commit2982b4cc622a2a95429b16f0aa3c55b7e20d798a (patch)
treea1453e59e3356d36b7bacaf272298f91f6fa1407 /testing
parentfe049bdf23ae91b938e64fc2106aebf72be34e3b (diff)
downloadaspectj-2982b4cc622a2a95429b16f0aa3c55b7e20d798a.tar.gz
aspectj-2982b4cc622a2a95429b16f0aa3c55b7e20d798a.zip
The BIG commit.
- Enhanced structure model support. - *Incremental* structure model support written and tested (currently switched off, see incModelTests.xml) - -showWeaveInfo compiler option - existence of a 'runtimetest' surfaced through relationships - UI can determine if errors/warnings came from DEOWs. - Code to enable type mungers to remember source locations written (currently switched off)
Diffstat (limited to 'testing')
-rw-r--r--testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java17
-rw-r--r--testing/src/org/aspectj/testing/xml/SoftMessage.java2
2 files changed, 18 insertions, 1 deletions
diff --git a/testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java b/testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java
index f226d00d9..485dfe3d4 100644
--- a/testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java
+++ b/testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java
@@ -23,6 +23,8 @@ import java.util.List;
//import java.util.Collections;
//import java.util.List;
+import org.aspectj.ajde.ui.StructureModelUtil;
+import org.aspectj.ajde.ui.StructureModelUtil.ModelIncorrectException;
import org.aspectj.bridge.ICommand;
//import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.MessageUtil;
@@ -241,6 +243,9 @@ public class IncCompilerRun implements IAjcRun {
}
// final long startTime = System.currentTimeMillis();
commandResult = compiler.repeatCommand(handler);
+ if (!spec.checkModel.equals("")) {
+ StructureModelUtil.checkModel(spec.checkModel);
+ }
// XXX disabled LangUtil.throwIaxIfNotAllAssignable(actualRecompiled, File.class, "recompiled");
report = true;
// handler does not verify sandbox...
@@ -258,6 +263,8 @@ public class IncCompilerRun implements IAjcRun {
result = dirChanges.end(status, sandbox.testBaseDir);
}
}
+ } catch (ModelIncorrectException e) {
+ MessageUtil.fail(status,e.getMessage());
} finally {
if (!result || spec.runtime.isVerbose()) { // more debugging context in case of failure
MessageUtil.info(handler, "spec: " + spec.toLongString());
@@ -293,6 +300,8 @@ public class IncCompilerRun implements IAjcRun {
protected ArrayList classesAdded;
protected ArrayList classesRemoved;
protected ArrayList classesUpdated;
+
+ protected String checkModel;
/**
* skip description, skip sourceLocation,
@@ -312,6 +321,7 @@ public class IncCompilerRun implements IAjcRun {
classesAdded = new ArrayList();
classesRemoved = new ArrayList();
classesUpdated = new ArrayList();
+ checkModel="";
}
protected void initClone(Spec spec)
@@ -341,8 +351,13 @@ public class IncCompilerRun implements IAjcRun {
public void setTag(String input) {
tag = input;
}
+
+ public void setCheckModel(String thingsToCheck) {
+ this.checkModel=thingsToCheck;
+ }
+
public String toString() {
- return "IncCompile.Spec(" + tag + ", " + super.toString() + ")";
+ return "IncCompile.Spec(" + tag + ", " + super.toString() + ",["+checkModel+"])";
}
/** override to set dirToken to Sandbox.CLASSES and default suffix to ".class" */
diff --git a/testing/src/org/aspectj/testing/xml/SoftMessage.java b/testing/src/org/aspectj/testing/xml/SoftMessage.java
index 9c8ca57e1..88869e757 100644
--- a/testing/src/org/aspectj/testing/xml/SoftMessage.java
+++ b/testing/src/org/aspectj/testing/xml/SoftMessage.java
@@ -222,6 +222,8 @@ public class SoftMessage implements IMessage {
public boolean isFailed() {
return kind == IMessage.FAIL;
}
+
+ public boolean getDeclared() { return false; }
/** @return non-null String with simple message */
final public String getMessage() {