private boolean matchesThisVm(String vm) {
// vm might be 1.2, 1.3, 1.4, 1.5 or 1.9 possibly with a '+' in there
// For now assume + is attached to there only being one version, like "9+"
- if (vm.contains(LangUtil.getVmVersionString())) {
+ // System.out.println("Checking "+vm+" for "+LangUtil.getVmVersionString());
+ String v = LangUtil.getVmVersionString();
+ if (v.endsWith(".0")) {
+ v = v.substring(0,v.length()-2);
+ }
+ if (vm.contains(v)) {
return true;
}
if (vm.endsWith("+")) {
*******************************************************************************/
package org.aspectj.systemtest.ajc195;
+import org.aspectj.util.LangUtil;
+
import junit.framework.Test;
import junit.framework.TestSuite;
public static Test suite() {
TestSuite suite = new TestSuite("AspectJ 1.9.5 tests");
suite.addTest(Ajc195Tests.suite());
- suite.addTest(SanityTestsJava13.suite());
+ if (LangUtil.is13VMOrGreater()) {
+ suite.addTest(SanityTestsJava13.suite());
+ }
return suite;
}
}
*******************************************************************************/
package org.aspectj.systemtest.ajc196;
+import org.aspectj.util.LangUtil;
+
import junit.framework.Test;
import junit.framework.TestSuite;
public static Test suite() {
TestSuite suite = new TestSuite("AspectJ 1.9.6 tests");
- suite.addTest(Ajc196Tests.suite());
- suite.addTest(SanityTestsJava14.suite());
+ if (LangUtil.is14VMOrGreater()) {
+ suite.addTest(Ajc196Tests.suite());
+ suite.addTest(SanityTestsJava14.suite());
+ }
return suite;
}
}
<line text="Annotation count is 4"/>
<line text="@AnnoChar(value=z, ccc=a)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
<line text="@AnnoChar(value='z', ccc='a')" vm="9+"/>
- <line text="@AnnoDouble(value=99.0, ddd=3.0)"/>
+ <line text="@AnnoDouble(ddd=3.0, value=99.0)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
+ <line text="@AnnoDouble(value=99.0, ddd=3.0)" vm="11,12,13,14+"/>
<line text="@AnnoFloat(value=6.0, fff=4.0)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
<line text="@AnnoFloat(value=6.0f, fff=4.0f)" vm="9+"/>
<line text="@AnnoShort(value=8, sss=3)"/>