]> source.dussan.org Git - aspectj.git/commitdiff
testsrc/TestsModulesTests for consistency. Now to run compiler tests, just `cd tests...
authorwisberg <wisberg>
Wed, 8 Jun 2005 23:48:36 +0000 (23:48 +0000)
committerwisberg <wisberg>
Wed, 8 Jun 2005 23:48:36 +0000 (23:48 +0000)
tests/.classpath
tests/testsrc/TestsModuleTests.java [new file with mode: 0644]

index c7247db05b35fb9a2d27cfd827d81f008d6e424b..92e29f3bb56c8d58d914bcc49f462a9d751219cc 100644 (file)
@@ -13,5 +13,6 @@
        <classpathentry kind="var" path="JAVA_HOME/lib/tools.jar"/>
        <classpathentry sourcepath="/lib/bcel/bcel-src.zip" kind="lib" path="/lib/bcel/bcel.jar"/>
        <classpathentry kind="lib" path="/lib/ant/lib/ant-launcher.jar"/>
+       <classpathentry kind="src" path="testsrc"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/tests/testsrc/TestsModuleTests.java b/tests/testsrc/TestsModuleTests.java
new file mode 100644 (file)
index 0000000..2c79a7d
--- /dev/null
@@ -0,0 +1,42 @@
+/* *******************************************************************
+ * 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.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.aspectj.systemtest.AllTests;
+import org.aspectj.systemtest.AllTests14;
+import org.aspectj.systemtest.AllTests15;
+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
+        suite.addTest(AllTests.suite());            
+        if (LangUtil.is15VMOrGreater()) {
+            suite.addTest(AllTests14.suite());            
+            suite.addTest(AllTests15.suite());
+        } 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"));
+        }
+        return suite;
+    }
+}