From b5eb04579d5c5d1c0325ebe560c660bde938ce82 Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 21 Sep 2005 17:04:18 +0000 Subject: load 1.5 dependent tests reflectively... --- .../org/aspectj/weaver/tools/Java15PointcutExpressionTest.java | 8 ++++++++ weaver/testsrc/BcweaverModuleTests15.java | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/weaver/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java b/weaver/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java index 10651dc90..ceb549405 100644 --- a/weaver/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java +++ b/weaver/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java @@ -17,7 +17,9 @@ import java.lang.reflect.Method; import org.aspectj.lang.annotation.Pointcut; +import junit.framework.Test; import junit.framework.TestCase; +import junit.framework.TestSuite; /** * @author colyer @@ -25,6 +27,12 @@ import junit.framework.TestCase; */ public class Java15PointcutExpressionTest extends TestCase { + public static Test suite() { + TestSuite suite = new TestSuite("Java15PointcutExpressionTest"); + suite.addTestSuite(Java15PointcutExpressionTest.class); + return suite; + } + private PointcutParser parser; private Method a; private Method b; diff --git a/weaver/testsrc/BcweaverModuleTests15.java b/weaver/testsrc/BcweaverModuleTests15.java index 4ca66cc11..7523fb85b 100644 --- a/weaver/testsrc/BcweaverModuleTests15.java +++ b/weaver/testsrc/BcweaverModuleTests15.java @@ -13,6 +13,8 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.aspectj.testing.util.TestUtil; +import org.aspectj.util.LangUtil; import org.aspectj.weaver.BoundedReferenceTypeTestCase; import org.aspectj.weaver.MemberTestCase15; import org.aspectj.weaver.ReferenceTypeTestCase; @@ -20,7 +22,6 @@ import org.aspectj.weaver.TypeVariableReferenceTypeTestCase; import org.aspectj.weaver.TypeVariableTestCase; import org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXTestCase; import org.aspectj.weaver.patterns.WildTypePatternResolutionTestCase; -import org.aspectj.weaver.tools.Java15PointcutExpressionTest; public class BcweaverModuleTests15 extends TestCase { public static Test suite() { @@ -32,7 +33,9 @@ public class BcweaverModuleTests15 extends TestCase { suite.addTestSuite(MemberTestCase15.class); suite.addTestSuite(BcelGenericSignatureToTypeXTestCase.class); suite.addTestSuite(WildTypePatternResolutionTestCase.class); - suite.addTestSuite(Java15PointcutExpressionTest.class); + if (LangUtil.is15VMOrGreater()) { + TestUtil.loadTestsReflectively(suite, "org.aspectj.weaver.tools.Java15PointcutExpressionTest", false); + } return suite; } -- cgit v1.2.3