diff options
Diffstat (limited to 'testing/newsrc')
-rw-r--r-- | testing/newsrc/org/aspectj/testing/OutputLine.java | 26 | ||||
-rw-r--r-- | testing/newsrc/org/aspectj/testing/OutputSpec.java | 5 |
2 files changed, 20 insertions, 11 deletions
diff --git a/testing/newsrc/org/aspectj/testing/OutputLine.java b/testing/newsrc/org/aspectj/testing/OutputLine.java index d7350428a..fc6fe4ce9 100644 --- a/testing/newsrc/org/aspectj/testing/OutputLine.java +++ b/testing/newsrc/org/aspectj/testing/OutputLine.java @@ -12,25 +12,31 @@ package org.aspectj.testing; /** - * @author colyer - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates + * @author Adrian Colyer + * @author Andy Clement */ public class OutputLine { + // Expected text private String text; + + // Comma separated list of vm versions on which this is expected + private String vm; - /** - * @return Returns the text. - */ public String getText() { return text; } - /** - * @param text The text to set. - */ + public void setText(String text) { this.text = text; } + + public String getVm() { + return vm; + } + + public void setVm(String vm) { + this.vm = vm; + } + } diff --git a/testing/newsrc/org/aspectj/testing/OutputSpec.java b/testing/newsrc/org/aspectj/testing/OutputSpec.java index ffb3362f3..4f978f6b6 100644 --- a/testing/newsrc/org/aspectj/testing/OutputSpec.java +++ b/testing/newsrc/org/aspectj/testing/OutputSpec.java @@ -16,13 +16,16 @@ import java.util.ArrayList; import java.util.StringTokenizer; import org.aspectj.tools.ajc.AjcTestCase; +import org.aspectj.util.LangUtil; public class OutputSpec { private List<String> expectedOutputLines = new ArrayList<String>(); public void addLine(OutputLine line) { - expectedOutputLines.add(line.getText()); + if (line.getVm() == null || line.getVm().contains(LangUtil.getVmVersionString())) { + expectedOutputLines.add(line.getText()); + } } public void matchAgainst(String output) { |