}
if (m_stdErrSpec != null) {
String stderr2 = stderr.toString();
+ // Working around this rediculous message that still comes out of Java7 builds:
if (stderr2.indexOf("Class JavaLaunchHelper is implemented in both")!=-1 && stderr2.indexOf('\n')!=-1) {
- stderr2 = stderr2.substring(stderr2.indexOf('\n')+1);
+ stderr2 = stderr2.replaceAll("objc\\[[0-9]*\\]: Class JavaLaunchHelper is implemented in both [^\n]*\n","");
}
m_stdErrSpec.matchAgainst(stderr2);
}
import junit.framework.Test;
import org.aspectj.testing.XMLBasedAjcTestCase;
+import org.aspectj.util.LangUtil;
public class Ajc11Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
}
public void test092() {
- runTest("Compiler crash in ajc 1.1 - terrible error for inaccessible constructor");
+ if (LangUtil.is17VMOrGreater()) {
+ runTest("Compiler crash in ajc 1.1 - terrible error for inaccessible constructor - 1.7");
+ } else {
+ runTest("Compiler crash in ajc 1.1 - terrible error for inaccessible constructor");
+ }
}
public void test093() {
</compile>
</ajc-test>
+ <ajc-test dir="bugs" pr="39458"
+ title="Compiler crash in ajc 1.1 - terrible error for inaccessible constructor - 1.7">
+ <compile files="NewVoid.java">
+ <message kind="error" line="17"/>
+ <message kind="error" line="20"/>
+ <message kind="error" line="21"/>
+
+ <message kind="error" line="28"/>
+ <message kind="warning" line="29"/>
+ <message kind="error" line="30"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs" pr="39460"
title="Missing import crashes compiler">
<compile files="MissingImport.java">
</run>
</ajc-test>
- <ajc-test dir="java5/compliance" title="java 5 pointcuts and declares at pre-java 5 compliance levels">
+ <ajc-test dir="java5/compliance" title="java 5 pointcuts and declares at pre-java 5 compliance levels">
<compile files="AJ5FeaturesAtJ14.aj" options="-1.4">
<message kind="error" line="3" text="the @annotation pointcut expression is only supported at Java 5 compliance level or above"/>
<message kind="error" line="11" text="the @within pointcut expression is only supported at Java 5 compliance level or above"/>
</compile>
</ajc-test>
+ <ajc-test dir="java5/compliance" title="java 5 pointcuts and declares at pre-java 5 compliance levels - 1.7">
+ <compile files="AJ5FeaturesAtJ14.aj" options="-1.4">
+ <message kind="error" line="3" text="the @annotation pointcut expression is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="11" text="the @within pointcut expression is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="13" text="the @withincode pointcut expression is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="5" text="the @this pointcut expression is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="7" text="the @target pointcut expression is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="9" text="the @args pointcut expression is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="15" text="declare @type is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="15" text="annotations are only available if source level is 1.5 or greater"/>
+ <message kind="error" line="15" text="Foo is not an annotation type"/>
+ <message kind="error" line="17" text="declare @method is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="17" text="annotations are only available if source level is 1.5 or greater"/>
+ <message kind="error" line="17" text="Foo is not an annotation type"/>
+ <message kind="error" line="19" text="declare @field is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="19" text="annotations are only available if source level is 1.5 or greater"/>
+ <message kind="error" line="19" text="Foo is not an annotation type"/>
+ <message kind="error" line="21" text="declare @constructor is only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="21" text="annotations are only available if source level is 1.5 or greater"/>
+ <message kind="error" line="21" text="Foo is not an annotation type"/>
+ <message kind="error" line="25" text="annotation type patterns are only supported at Java 5 compliance level or above"/>
+ <message kind="error" line="27" text="annotation type patterns are only supported at Java 5 compliance level or above"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs150" pr="91114" title="before and after are valid identifiers in classes, part 2">
<compile files="pr91114.aj">