From ef3480573b33191f91d378472fdbee4272dfa0e0 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Fri, 1 Feb 2019 10:52:32 -0800 Subject: [PATCH] Add module tests back in - but streamlined --- .../org/aspectj/weaver/AllWeaver5Tests.java | 40 ------ .../aspectj/weaver/BcweaverModule15Test.java | 41 ------ ...lectionBasedReferenceTypeDelegateTest.java | 9 -- .../aspectj/weaver/Weaver5ModuleTests.java | 37 ------ .../org/aspectj/weaver/WeaverModuleTests.java | 124 ++++++++++++++++++ 5 files changed, 124 insertions(+), 127 deletions(-) delete mode 100644 weaver/src/test/java/org/aspectj/weaver/AllWeaver5Tests.java delete mode 100644 weaver/src/test/java/org/aspectj/weaver/BcweaverModule15Test.java delete mode 100644 weaver/src/test/java/org/aspectj/weaver/Weaver5ModuleTests.java create mode 100644 weaver/src/test/java/org/aspectj/weaver/WeaverModuleTests.java diff --git a/weaver/src/test/java/org/aspectj/weaver/AllWeaver5Tests.java b/weaver/src/test/java/org/aspectj/weaver/AllWeaver5Tests.java deleted file mode 100644 index 6ce2e0354..000000000 --- a/weaver/src/test/java/org/aspectj/weaver/AllWeaver5Tests.java +++ /dev/null @@ -1,40 +0,0 @@ -///* ******************************************************************* -// * Copyright (c) 2005-2006 Contributors. -// * All rights reserved. -// * This program and the accompanying materials are made available -// * under the terms of the Eclipse Public License v1.0 -// * which accompanies this distribution and is available at -// * http://eclipse.org/legal/epl-v10.html -// * -// * Contributors: -// * Adrian Colyer Initial implementation -// * Matthew Webster Move from default package -// * ******************************************************************/ -//package org.aspectj.weaver; -// -//import junit.framework.Test; -//import junit.framework.TestSuite; -// -//import org.aspectj.weaver.reflect.ReflectionWorldReferenceTypeTest; -//import org.aspectj.weaver.reflect.ReflectionWorldSpecificTest; -//import org.aspectj.weaver.tools.PointcutExpressionTest; -// -//public class AllWeaver5Tests { -// -// public static Test suite() { -// TestSuite suite = new TestSuite(AllWeaver5Tests.class.getName()); -// // $JUnit-BEGIN$ -// suite.addTest(AllTracing5Tests.suite()); -// suite.addTest(BcweaverModule15Test.suite()); -// suite.addTestSuite(ReflectionWorldReferenceTypeTest.class); -// suite.addTestSuite(PointcutExpressionTest.class); -// suite.addTestSuite(JoinPointSignatureIteratorTest.class); -// // gives incompatible class version error... -// // suite.addTestSuite(ReflectionWorldAdvancedPointcutExpressionTests.class -// // ); -// suite.addTestSuite(ReflectionWorldSpecificTest.class); -// // $JUnit-END$ -// return suite; -// } -// -//} diff --git a/weaver/src/test/java/org/aspectj/weaver/BcweaverModule15Test.java b/weaver/src/test/java/org/aspectj/weaver/BcweaverModule15Test.java deleted file mode 100644 index 8455315ff..000000000 --- a/weaver/src/test/java/org/aspectj/weaver/BcweaverModule15Test.java +++ /dev/null @@ -1,41 +0,0 @@ -//package org.aspectj.weaver; -// -///* ******************************************************************* -// * Copyright (c) 2005 Contributors. -// * All rights reserved. -// * This program and the accompanying materials are made available -// * under the terms of the Eclipse Public License v1.0 -// * which accompanies this distribution and is available at -// * http://eclipse.org/legal/epl-v10.html -// * -// * Contributors: -// * Adrian Colyer Initial implementation -// * ******************************************************************/ -//import junit.framework.Test; -//import junit.framework.TestCase; -//import junit.framework.TestSuite; -// -//import org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXTestCase; -//import org.aspectj.weaver.bcel.BcelWorldReferenceTypeTest; -//import org.aspectj.weaver.patterns.WildTypePatternResolutionTestCase; -//import org.aspectj.weaver.tools.Java15PointcutExpressionTest; -// -//public class BcweaverModule15Test extends TestCase { -// public static Test suite() { -// TestSuite suite = new TestSuite(BcweaverModule15Test.class.getName()); -// suite.addTestSuite(BcelGenericSignatureToTypeXTestCase.class); -// suite.addTestSuite(BoundedReferenceTypeTestCase.class); -// suite.addTest(Java15PointcutExpressionTest.suite()); -// suite.addTestSuite(Member15Test.class); -// suite.addTestSuite(BcelWorldReferenceTypeTest.class); -// suite.addTest(Java5ReflectionBasedReferenceTypeDelegateTest.suite()); -// suite.addTestSuite(TypeVariableTestCase.class); -// suite.addTestSuite(TypeVariableReferenceTypeTestCase.class); -// suite.addTestSuite(WildTypePatternResolutionTestCase.class); -// return suite; -// } -// -// public BcweaverModule15Test(String name) { -// super(name); -// } -//} diff --git a/weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java b/weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java index 9f6a2965e..cc9a895d0 100644 --- a/weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java +++ b/weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java @@ -12,9 +12,6 @@ package org.aspectj.weaver; -import junit.framework.Test; -import junit.framework.TestSuite; - import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Field; @@ -23,12 +20,6 @@ import org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateTest; public class Java5ReflectionBasedReferenceTypeDelegateTest extends ReflectionBasedReferenceTypeDelegateTest { - public static Test suite() { - TestSuite suite = new TestSuite("TestJava5ReflectionBasedReferenceTypeDelegate"); - suite.addTestSuite(Java5ReflectionBasedReferenceTypeDelegateTest.class); - return suite; - } - /** * Let's play about with a generic type and ensure we can work with it in a reflective world. */ diff --git a/weaver/src/test/java/org/aspectj/weaver/Weaver5ModuleTests.java b/weaver/src/test/java/org/aspectj/weaver/Weaver5ModuleTests.java deleted file mode 100644 index d54732b08..000000000 --- a/weaver/src/test/java/org/aspectj/weaver/Weaver5ModuleTests.java +++ /dev/null @@ -1,37 +0,0 @@ -//package org.aspectj.weaver; -///******************************************************************************* -// * Copyright (c) 2005 Contributors. -// * All rights reserved. -// * This program and the accompanying materials are made available -// * under the terms of the Eclipse Public License v1.0 -// * which accompanies this distribution and is available at -// * http://eclipse.org/legal/epl-v10.html -// * -// * Contributors: (See CVS logs) -// * -// *******************************************************************************/ -// -//import junit.framework.Test; -//import junit.framework.TestCase; -//import junit.framework.TestSuite; -// -//import org.aspectj.testing.util.TestUtil; -// -///** -// */ -//public class Weaver5ModuleTests extends TestCase { -// -// public static Test suite() { -// TestSuite suite = new TestSuite(Weaver5ModuleTests.class.getName()); -// if (TestUtil.is15VMOrGreater()) { -// TestUtil.loadTestsReflectively(suite, "org.aspectj.weaver.AllWeaver5Tests", false); -// } else { -// suite.addTest(TestUtil.testNamed("all tests require 1.5")); -// } -// return suite; -// } -// public static void main(String[] args) { -// junit.textui.TestRunner.main(new String[] {Weaver5ModuleTests.class.getName()}); -// } -// -//} diff --git a/weaver/src/test/java/org/aspectj/weaver/WeaverModuleTests.java b/weaver/src/test/java/org/aspectj/weaver/WeaverModuleTests.java new file mode 100644 index 000000000..ffbe329df --- /dev/null +++ b/weaver/src/test/java/org/aspectj/weaver/WeaverModuleTests.java @@ -0,0 +1,124 @@ +/* ******************************************************************* + * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * PARC initial implementation + * ******************************************************************/ +package org.aspectj.weaver; + +import org.aspectj.matcher.tools.ReflectionWorldAdvancedPointcutExpressionTest; +import org.aspectj.util.LangUtil; +import org.aspectj.weaver.bcel.*; +import org.aspectj.weaver.patterns.*; +import org.aspectj.weaver.patterns.bcel.*; +import org.aspectj.weaver.reflect.*; +import org.aspectj.weaver.tools.*; +import org.aspectj.weaver.tools.cache.*; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +public class WeaverModuleTests extends TestCase { + + public static Test suite() { + TestSuite suite = new TestSuite(WeaverModuleTests.class.getName()); + suite.addTestSuite(BoundedReferenceTypeTestCase.class); + suite.addTestSuite(CommonsTraceFactoryTest.class); + suite.addTestSuite(CommonsTraceTest.class); + suite.addTestSuite(DefaultTraceFactoryTest.class); + suite.addTestSuite(DefaultTraceTest.class); + suite.addTestSuite(DumpTestCase.class); + suite.addTestSuite(GenericSignatureParserTest.class); + suite.addTestSuite(Java5ReflectionBasedReferenceTypeDelegateTest.class); + suite.addTestSuite(Jdk14TraceFactoryTest.class); + suite.addTestSuite(Jdk14TraceTest.class); + suite.addTestSuite(JoinPointSignatureIteratorTest.class); + suite.addTestSuite(LocaleTest.class); + suite.addTestSuite(Member15Test.class); + suite.addTestSuite(Member15TestCase.class); + suite.addTestSuite(MemberTestCase.class); + suite.addTestSuite(ParameterizedReferenceTypeTestCase.class); + suite.addTestSuite(ReferenceTypeTestCase.class); + suite.addTestSuite(ResolvedMemberSignatures15TestCase.class); + suite.addTestSuite(TraceFactoryTest.class); + suite.addTestSuite(TypeVariableTestCase.class); + suite.addTestSuite(WeaverMessagesTestCase.class); + + suite.addTestSuite(AfterReturningWeaveTestCase.class); + suite.addTestSuite(AfterThrowingWeaveTestCase.class); + suite.addTestSuite(AfterWeaveTestCase.class); + suite.addTestSuite(ArgsWeaveTestCase.class); + suite.addTestSuite(AroundArgsWeaveTestCase.class); + suite.addTestSuite(AroundWeaveTestCase.class); + suite.addTestSuite(BcelGenericSignatureToTypeXTestCase.class); + suite.addTestSuite(BcelWorldReferenceTypeTest.class); + suite.addTestSuite(BeforeWeaveTestCase.class); + suite.addTestSuite(CheckerTestCase.class); + suite.addTestSuite(ClassLoaderRepositoryTest.class); + suite.addTestSuite(FieldSetTestCase.class); + suite.addTestSuite(HierarchyDependsTestCase.class); + suite.addTestSuite(IdWeaveTestCase.class); + if (LangUtil.is19VMOrGreater()) { + suite.addTestSuite(JImageTestCase.class); + } + suite.addTestSuite(MegaZipTestCase.class); + suite.addTestSuite(MoveInstructionsWeaveTestCase.class); + suite.addTestSuite(NonstaticWeaveTestCase.class); + suite.addTestSuite(PatternWeaveTestCase.class); + suite.addTestSuite(PointcutResidueTestCase.class); + suite.addTestSuite(TjpWeaveTestCase.class); + suite.addTestSuite(TraceJarWeaveTestCase.class); + suite.addTestSuite(UtilityTestCase.class); + suite.addTestSuite(WeaveOrderTestCase.class); + suite.addTestSuite(WorldTestCase.class); + suite.addTestSuite(ZipTestCase.class); + suite.addTestSuite(TypeXTestCase.class); + + suite.addTestSuite(AnnotationPatternMatchingTestCase.class); + suite.addTestSuite(AnnotationPatternTestCase.class); + suite.addTestSuite(ConcretizationTestCase.class); + suite.addTestSuite(WildTypePatternResolutionTestCase.class); + + suite.addTestSuite(BcelAndOrNotTestCase.class); + suite.addTestSuite(BcelBindingTestCase.class); + suite.addTestSuite(BcelModifiersPatternTestCase.class); + suite.addTestSuite(BcelParserTestCase.class); + suite.addTestSuite(BcelSignaturePatternTestCase.class); + suite.addTestSuite(BcelTypePatternListTestCase.class); + suite.addTestSuite(BcelTypePatternTestCase.class); + suite.addTestSuite(BcelWithinTestCase.class); + + suite.addTestSuite(ReflectionWorldReferenceTypeTest.class); + suite.addTestSuite(ReflectionWorldTest.class); + + suite.addTestSuite(Java15PointcutExpressionTest.class); + suite.addTestSuite(PointcutDesignatorHandlerTest.class); + suite.addTestSuite(PointcutExpressionTest.class); + suite.addTestSuite(PointcutParserTest.class); + suite.addTestSuite(ReadingAttributesTest.class); + suite.addTestSuite(TypePatternMatcherTest.class); + + suite.addTestSuite(DefaultCacheKeyResolverTest.class); + suite.addTestSuite(DefaultFileCacheBackingTest.class); + suite.addTestSuite(FlatFileCacheBackingTest.class); + suite.addTestSuite(SimpleClassCacheTest.class); + suite.addTestSuite(WeavedClassCacheTest.class); + suite.addTestSuite(ZippedFileCacheBackingTest.class); + + suite.addTestSuite(ReflectionWorldAdvancedPointcutExpressionTest.class); + suite.addTestSuite(TypeVariableReferenceTypeTestCase.class); + + return suite; + } + + public WeaverModuleTests(String name) { + super(name); + } + +} -- 2.39.5