aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aspectj5rt/testsrc/Aspectj5rtModuleTests.java6
-rw-r--r--loadtime5/testsrc/Loadtime5ModuleTests.java6
2 files changed, 10 insertions, 2 deletions
diff --git a/aspectj5rt/testsrc/Aspectj5rtModuleTests.java b/aspectj5rt/testsrc/Aspectj5rtModuleTests.java
index f0f6a3064..6681a2f11 100644
--- a/aspectj5rt/testsrc/Aspectj5rtModuleTests.java
+++ b/aspectj5rt/testsrc/Aspectj5rtModuleTests.java
@@ -21,7 +21,11 @@ public class Aspectj5rtModuleTests extends TestCase {
public static Test suite() {
TestSuite suite = new TestSuite("Aspectj5rt module tests");
- TestUtil.loadTestsReflectively(suite, "Aspectj5rt15ModuleTests", true);
+ if (TestUtil.is15VMOrGreater()) {
+ TestUtil.loadTestsReflectively(suite, "Aspectj5rt15ModuleTests", true);
+ } else {
+ suite.addTest(TestUtil.skipTest("for aspectj5rt that need 1.5"));
+ }
return suite;
}
diff --git a/loadtime5/testsrc/Loadtime5ModuleTests.java b/loadtime5/testsrc/Loadtime5ModuleTests.java
index 231c80df6..526750347 100644
--- a/loadtime5/testsrc/Loadtime5ModuleTests.java
+++ b/loadtime5/testsrc/Loadtime5ModuleTests.java
@@ -22,7 +22,11 @@ public class Loadtime5ModuleTests extends TestCase {
public static Test suite() {
TestSuite suite = new TestSuite(Loadtime5ModuleTests.class.getName());
- TestUtil.loadTestsReflectively(suite, "Loadtime515ModuleTests", true);
+ if (TestUtil.is15VMOrGreater()) {
+ TestUtil.loadTestsReflectively(suite, "Loadtime515ModuleTests", true);
+ } else {
+ suite.addTest(TestUtil.testNamed("all tests require 1.5"));
+ }
return suite;
}
public static void main(String[] args) {