aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Grefer <eclipse@larsgrefer.de>2020-08-13 23:21:11 +0200
committerLars Grefer <eclipse@larsgrefer.de>2020-08-13 23:21:11 +0200
commitd7ba05ce26dd8f72c1d0695ece2cb03d035e3cf9 (patch)
treeb0ca80a1154a73ca8ed1d5d4cf175c2682af6fce /tests
parent4f027bd94fe71756894f13a4a82123eda4f28b98 (diff)
downloadaspectj-d7ba05ce26dd8f72c1d0695ece2cb03d035e3cf9.tar.gz
aspectj-d7ba05ce26dd8f72c1d0695ece2cb03d035e3cf9.zip
Remove checks for old Java Versions
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc11/Ajc11Tests.java6
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java20
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java5
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java10
-rw-r--r--tests/src/test/java/org/aspectj/tests/TestsModuleTests.java12
5 files changed, 11 insertions, 42 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc11/Ajc11Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc11/Ajc11Tests.java
index b7fa755db..47c64f2f5 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc11/Ajc11Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc11/Ajc11Tests.java
@@ -389,11 +389,7 @@ public class Ajc11Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
}
public void test092() {
- 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");
- }
+ runTest("Compiler crash in ajc 1.1 - terrible error for inaccessible constructor - 1.7");
}
public void test093() {
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index 8dcb8c34d..62e96d0df 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -406,14 +406,12 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testBadASMforEnums() throws IOException {
runTest("bad asm for enums");
- if (LangUtil.is15VMOrGreater()) {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- PrintWriter pw = new PrintWriter(baos);
- AsmManager.dumptree(pw, AsmManager.lastActiveStructureModel.getHierarchy().getRoot(), 0);
- pw.flush();
- String tree = baos.toString();
- assertTrue("Expected 'Red [enumvalue]' somewhere in here:" + tree, tree.contains("Red [enumvalue]"));
- }
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ PrintWriter pw = new PrintWriter(baos);
+ AsmManager.dumptree(pw, AsmManager.lastActiveStructureModel.getHierarchy().getRoot(), 0);
+ pw.flush();
+ String tree = baos.toString();
+ assertTrue("Expected 'Red [enumvalue]' somewhere in here:" + tree, tree.contains("Red [enumvalue]"));
}
public void npeOnTypeNotFound() {
@@ -840,11 +838,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
}
public void testJava5SpecificFeaturesUsedAtJava14OrLower() {
- if (LangUtil.is17VMOrGreater()) {
- runTest("java 5 pointcuts and declares at pre-java 5 compliance levels - 1.7");
- } else {
- runTest("java 5 pointcuts and declares at pre-java 5 compliance levels");
- }
+ runTest("java 5 pointcuts and declares at pre-java 5 compliance levels - 1.7");
}
public void testAnonymousTypes() {
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java b/tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java
index 76c956965..95ab500fc 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java
@@ -922,10 +922,7 @@ public class GenericsTests extends XMLBasedAjcTestCase {
*/
public static boolean isBridge(java.lang.reflect.Method m) {
// why not importing java.lang.reflect.Method? No BCEL clash?
- if (!LangUtil.is15VMOrGreater()) {
- return false;
- }
- try {
+ try {
final Class<?>[] noparms = new Class[0];
java.lang.reflect.Method isBridge
= java.lang.reflect.Method.class.getMethod("isBridge", noparms);
diff --git a/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java b/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java
index c46708feb..aa9531979 100644
--- a/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java
@@ -49,17 +49,14 @@ public class Java14Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// }
public void test006(){
- if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 006 not >=1.4");return;}
runTest("compiling asserts in methods");
}
public void test007(){
- if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 007 not >=1.4");return;}
runTest("asserts");
}
public void test008(){
- if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 008 not >=1.4");return;}
runTest("asserts in aspect and declared methods [requires 1.4]");
}
@@ -76,7 +73,7 @@ public class Java14Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
}
public void test012(){
- if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 012 not >=1.4");return;}
+ if (!true) { System.err.println("Skipping test 012 not >=1.4");return;}
runTest("assert tests in introduction [requires 1.4]");
}
@@ -85,22 +82,18 @@ public class Java14Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
}
public void test014(){
- if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 014 not >=1.4");return;}
runTest("assert statement in advice coverage [requires 1.4]");
}
public void test015(){
- if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 015 not >=1.4");return;}
runTest("assert statement in advice [requires 1.4]");
}
public void test016(){
- if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 016 not >=1.4");return;}
runTest("assert and pertarget crashes compiler");
}
public void test017(){
- if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 017 not >=1.4");return;}
runTest("testing that assert works like .class");
}
@@ -117,7 +110,6 @@ public class Java14Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// }
public void test021(){
- if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 021 not >=1.4");return;}
runTest("Class Literals as non final fields (also assert, and this$0)");
}
diff --git a/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java b/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java
index 1232f3909..9c83f47f0 100644
--- a/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java
+++ b/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java
@@ -1,7 +1,5 @@
package org.aspectj.tests;
-import org.aspectj.systemtest.AllTests;
-import org.aspectj.systemtest.AllTests14;
import org.aspectj.systemtest.AllTests17;
import org.aspectj.systemtest.AllTests18;
import org.aspectj.systemtest.AllTests19;
@@ -33,18 +31,10 @@ public class TestsModuleTests extends TestCase {
suite.addTest(AllTests19.suite());
} else if (LangUtil.is18VMOrGreater()) {
suite.addTest(AllTests18.suite());
- } else if (LangUtil.is15VMOrGreater()) {
+ } else {
// suite.addTest(AllTests15.suite());
suite.addTest(AllTests17.suite()); // there are currently (28/11/06) no tests specific to a 1.6/1.7 vm - so we can do
// this
- } else if (LangUtil.is1dot4VMOrGreater()) {
- System.err.println("Skipping tests for 1.5");
- // suite.addTest(TestUtil.skipTest("for 1.5"));
- suite.addTest(AllTests14.suite());
- } else {
- System.err.println("Skipping tests for 1.4 and 1.5");
- // suite.addTest(TestUtil.skipTest("for 1.4 and 1.5"));
- suite.addTest(AllTests.suite());
}
return suite;
}