]> source.dussan.org Git - aspectj.git/commitdiff
Add module tests back in - but streamlined
authorAndy Clement <aclement@pivotal.io>
Fri, 1 Feb 2019 00:10:22 +0000 (16:10 -0800)
committerAndy Clement <aclement@pivotal.io>
Fri, 1 Feb 2019 00:10:22 +0000 (16:10 -0800)
loadtime/src/test/java/org/aspectj/loadtime/Loadtime5ModuleTests.java [deleted file]
loadtime/src/test/java/org/aspectj/loadtime/LoadtimeModuleTests.java [new file with mode: 0644]
tests/src/test/java/org/aspectj/tests/TestsModuleTests.java [deleted file]
tests/src/test/java/org/aspectj/tests/TstsModuleTests.java [new file with mode: 0644]

diff --git a/loadtime/src/test/java/org/aspectj/loadtime/Loadtime5ModuleTests.java b/loadtime/src/test/java/org/aspectj/loadtime/Loadtime5ModuleTests.java
deleted file mode 100644 (file)
index 665aecd..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.aspectj.loadtime;
-/*******************************************************************************
- * 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 org.aspectj.testing.util.TestUtil;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- */
-public class Loadtime5ModuleTests extends TestCase {
-
-    public static Test suite() {
-        TestSuite suite = new TestSuite(Loadtime5ModuleTests.class.getName());
-        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) {
-        junit.textui.TestRunner.main(new String[] {Loadtime5ModuleTests.class.getName()});
-    }
-
-}
diff --git a/loadtime/src/test/java/org/aspectj/loadtime/LoadtimeModuleTests.java b/loadtime/src/test/java/org/aspectj/loadtime/LoadtimeModuleTests.java
new file mode 100644 (file)
index 0000000..9d365ff
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2005-2019 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
+ *******************************************************************************/
+package org.aspectj.loadtime;
+
+import org.aspectj.weaver.loadtime.AjTest;
+import org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptorTest;
+import org.aspectj.weaver.loadtime.JRockitAgentTest;
+import org.aspectj.weaver.loadtime.LoadtimeTest;
+import org.aspectj.weaver.loadtime.WeavingContextTest;
+import org.aspectj.weaver.loadtime.WeavingURLClassLoaderTest;
+import org.aspectj.weaver.loadtime.test.DocumentParserTest;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author Andy Clement
+ * @author Alexandre Vasseur
+ */
+public class LoadtimeModuleTests extends TestCase {
+
+       public static Test suite() {
+               TestSuite suite = new TestSuite(LoadtimeModuleTests.class.getName());
+               suite.addTestSuite(DocumentParserTest.class);
+               suite.addTestSuite(AjTest.class);
+               suite.addTestSuite(ClassLoaderWeavingAdaptorTest.class);
+               suite.addTestSuite(JRockitAgentTest.class);
+               suite.addTestSuite(LoadtimeTest.class);
+               suite.addTestSuite(WeavingContextTest.class);
+               suite.addTestSuite(WeavingURLClassLoaderTest.class);
+               return suite;
+       }
+
+       public static void main(String args[]) throws Throwable {
+               TestRunner.run(suite());
+       }
+
+}
diff --git a/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java b/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java
deleted file mode 100644 (file)
index 672a952..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.aspectj.tests;
-
-/* *******************************************************************
- * 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: 
- *     Wes Isberg       initial implementation 
- * ******************************************************************/
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-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;
-import org.aspectj.util.LangUtil;
-
-public class TestsModuleTests extends TestCase {
-
-       public static Test suite() {
-               String name = TestsModuleTests.class.getName();
-               TestSuite suite = new TestSuite(name);
-               // compiler tests, wrapped for JUnit
-               if (LangUtil.is19VMOrGreater()) {
-                       suite.addTest(AllTests19.suite());      
-               } else if (LangUtil.is18VMOrGreater()) {
-                       suite.addTest(AllTests18.suite());      
-               } else if (LangUtil.is15VMOrGreater()) {
-                       // 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.is14VMOrGreater()) {
-                       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;
-       }
-}
diff --git a/tests/src/test/java/org/aspectj/tests/TstsModuleTests.java b/tests/src/test/java/org/aspectj/tests/TstsModuleTests.java
new file mode 100644 (file)
index 0000000..672a952
--- /dev/null
@@ -0,0 +1,51 @@
+package org.aspectj.tests;
+
+/* *******************************************************************
+ * 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: 
+ *     Wes Isberg       initial implementation 
+ * ******************************************************************/
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+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;
+import org.aspectj.util.LangUtil;
+
+public class TestsModuleTests extends TestCase {
+
+       public static Test suite() {
+               String name = TestsModuleTests.class.getName();
+               TestSuite suite = new TestSuite(name);
+               // compiler tests, wrapped for JUnit
+               if (LangUtil.is19VMOrGreater()) {
+                       suite.addTest(AllTests19.suite());      
+               } else if (LangUtil.is18VMOrGreater()) {
+                       suite.addTest(AllTests18.suite());      
+               } else if (LangUtil.is15VMOrGreater()) {
+                       // 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.is14VMOrGreater()) {
+                       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;
+       }
+}