diff options
Diffstat (limited to 'testing/src')
-rw-r--r-- | testing/src/test/java/org/aspectj/testing/CompileSpec.java | 2 | ||||
-rw-r--r-- | testing/src/test/java/org/aspectj/testing/ExpectedMessageSpec.java | 32 |
2 files changed, 32 insertions, 2 deletions
diff --git a/testing/src/test/java/org/aspectj/testing/CompileSpec.java b/testing/src/test/java/org/aspectj/testing/CompileSpec.java index 889183303..b018102d9 100644 --- a/testing/src/test/java/org/aspectj/testing/CompileSpec.java +++ b/testing/src/test/java/org/aspectj/testing/CompileSpec.java @@ -329,7 +329,7 @@ public class CompileSpec implements ITestStep { } else if (kind.equals("abort")) { fails.add(exMsg.toMessage()); } else if (kind.equals("weave")) { - weaveInfos.add(exMsg.toMessage()); + weaveInfos.add(exMsg.toWeaveMessage()); } else if (kind.equals("usage")) { weaveInfos.add(exMsg.toMessage()); } diff --git a/testing/src/test/java/org/aspectj/testing/ExpectedMessageSpec.java b/testing/src/test/java/org/aspectj/testing/ExpectedMessageSpec.java index 23903beb7..5d438a677 100644 --- a/testing/src/test/java/org/aspectj/testing/ExpectedMessageSpec.java +++ b/testing/src/test/java/org/aspectj/testing/ExpectedMessageSpec.java @@ -23,12 +23,18 @@ public class ExpectedMessageSpec { private String kind = "error"; private int line = -1; + private int aspectLine = -1; private String text; private String file; + private String aspectFile; private String details; public AjcTestCase.Message toMessage() { - return new AjcTestCase.Message(line,file,text,null); + return new AjcTestCase.Message(line, file, text, null); + } + + public AjcTestCase.Message toWeaveMessage() { + return new AjcTestCase.Message(line, file, aspectLine, aspectFile, text, null); } /** @@ -56,6 +62,18 @@ public class ExpectedMessageSpec { this.file = file; } /** + * @return Returns the aspect file. + */ + public String getAspectFile() { + return aspectFile; + } + /** + * @param aspectFile The aspect file to set. + */ + public void setAspectFile(String aspectFile) { + this.aspectFile = aspectFile; + } + /** * @return Returns the kind. */ public String getKind() { @@ -80,6 +98,18 @@ public class ExpectedMessageSpec { this.line = line; } /** + * @return Returns the asperct line. + */ + public int getAspectLine() { + return aspectLine; + } + /** + * @param aspectLine The aspect line to set. + */ + public void setAspectLine(int aspectLine) { + this.aspectLine = aspectLine; + } + /** * @return Returns the text. */ public String getText() { |