aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-08-07 15:06:16 -0700
committerAndy Clement <aclement@gopivotal.com>2014-08-07 15:06:16 -0700
commit7ca261cce0b5cdb5bcd31249002b35b948604b9e (patch)
tree77b772923c7372d744e5a3462d93b4933dc15098 /testing
parentb09622f37d7c6d10eb3331097e2c09d670db61fa (diff)
downloadaspectj-7ca261cce0b5cdb5bcd31249002b35b948604b9e.tar.gz
aspectj-7ca261cce0b5cdb5bcd31249002b35b948604b9e.zip
Update JDT to 2b07958
Diffstat (limited to 'testing')
-rw-r--r--testing/newsrc/org/aspectj/testing/AntSpec.java6
-rw-r--r--testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java13
2 files changed, 18 insertions, 1 deletions
diff --git a/testing/newsrc/org/aspectj/testing/AntSpec.java b/testing/newsrc/org/aspectj/testing/AntSpec.java
index 5eaa087d5..fe6a961b5 100644
--- a/testing/newsrc/org/aspectj/testing/AntSpec.java
+++ b/testing/newsrc/org/aspectj/testing/AntSpec.java
@@ -194,7 +194,11 @@ public class AntSpec implements ITestStep {
m_stdOutSpec.matchAgainst(stdout.toString());
}
if (m_stdErrSpec != null) {
- m_stdErrSpec.matchAgainst(stderr.toString());
+ String stderr2 = stderr.toString();
+ if (stderr2.indexOf("Class JavaLaunchHelper is implemented in both")!=-1 && stderr2.indexOf('\n')!=-1) {
+ stderr2 = stderr2.substring(stderr2.indexOf('\n')+1);
+ }
+ m_stdErrSpec.matchAgainst(stderr2);
}
}
diff --git a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
index 652839a5b..0126d29b3 100644
--- a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
+++ b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
@@ -28,6 +28,7 @@ import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.digester.Digester;
+import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.LocalVariable;
import org.aspectj.apache.bcel.classfile.LocalVariableTable;
@@ -322,6 +323,18 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
return getMethodStartsWith(jc,prefix,1);
}
+ protected Attribute getAttributeStartsWith(Attribute[] attributes, String prefix) {
+ StringBuilder buf = new StringBuilder();
+ for (Attribute a: attributes) {
+ if (a.getName().startsWith(prefix)) {
+ return a;
+ }
+ buf.append(a.toString()).append("\n");
+ }
+ fail("Failed to find '"+prefix+"' in attributes:\n"+buf.toString());
+ return null;
+ }
+
protected Method getMethodStartsWith(JavaClass jc, String prefix, int whichone) {
Method[] meths = jc.getMethods();
for (int i = 0; i < meths.length; i++) {